{"action":"closed","issue":{"url":"https://api.github.com/repos/Arcidev/HauntedHouse/issues/5","labels_url":"https://api.github.com/repos/Arcidev/HauntedHouse/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/Arcidev/HauntedHouse/issues/5/comments","events_url":"https://api.github.com/repos/Arcidev/HauntedHouse/issues/5/events","html_url":"https://github.com/Arcidev/HauntedHouse/issues/5","id":118476413,"number":5,"title":"Implement history facade","user":{"login":"Arcidev","id":7854000,"avatar_url":"https://avatars.githubusercontent.com/u/7854000?v=3","gravatar_id":"","url":"https://api.github.com/users/Arcidev","html_url":"https://github.com/Arcidev","followers_url":"https://api.github.com/users/Arcidev/followers","following_url":"https://api.github.com/users/Arcidev/following{/other_user}","gists_url":"https://api.github.com/users/Arcidev/gists{/gist_id}","starred_url":"https://api.github.com/users/Arcidev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arcidev/subscriptions","organizations_url":"https://api.github.com/users/Arcidev/orgs","repos_url":"https://api.github.com/users/Arcidev/repos","events_url":"https://api.github.com/users/Arcidev/events{/privacy}","received_events_url":"https://api.github.com/users/Arcidev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Arcidev/HauntedHouse/labels/Implementation","name":"Implementation","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"Lucinda90","id":14804773,"avatar_url":"https://avatars.githubusercontent.com/u/14804773?v=3","gravatar_id":"","url":"https://api.github.com/users/Lucinda90","html_url":"https://github.com/Lucinda90","followers_url":"https://api.github.com/users/Lucinda90/followers","following_url":"https://api.github.com/users/Lucinda90/following{/other_user}","gists_url":"https://api.github.com/users/Lucinda90/gists{/gist_id}","starred_url":"https://api.github.com/users/Lucinda90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lucinda90/subscriptions","organizations_url":"https://api.github.com/users/Lucinda90/orgs","repos_url":"https://api.github.com/users/Lucinda90/repos","events_url":"https://api.github.com/users/Lucinda90/events{/privacy}","received_events_url":"https://api.github.com/users/Lucinda90/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Arcidev/HauntedHouse/milestones/2","html_url":"https://github.com/Arcidev/HauntedHouse/milestones/2nd%20milestone","labels_url":"https://api.github.com/repos/Arcidev/HauntedHouse/milestones/2/labels","id":1424029,"number":2,"title":"2nd milestone","description":"\r\nImplement Facade layer interfaces and implementations.\r\nEverything that should happen in the system must be available through these interfaces (create entities, deleting them etc);\r\nYou must have at least 2 non-trivial business functions on Service Layer (the example project contains several of them). Service layer is not always just a place to delegate to DAO;\r\n\r\nOther points about the Facade and Service layers:\r\nAll the classes must be wired via dependency injection. Your service objects should obtain an instance of the EntityManager that way;\r\nAll the facade interfaces must not reference entities, but Transfer Objects only;\r\nAll service interfaces must reference only entities, not Data Transfer Objects;\r\nYou can use Dozer framework to map entity instances to transfer objects. The mapping may be done on Facade Layer;\r\nFacade layer is used to drive transactions;\r\n\r\nChange layout of your project to Multimodule Maven project (tutorial here http://maven.apache.org/guides/getting-started/index.html) Your project should have 3 separate modules:\r\nDAO layer\r\nService Layer and Facade Layer implementation\r\nAPI layer - just DTOs and facade interfaces!\r\n\r\nFacade layer will use Service layer and Service layer will use DAO layer;\r\n\r\nMake sure that DataAccessException or its subclass is thrown in case of any exception on a the DAO layer;\r\n\r\nImplement simple unit tests for facade layer. Just one simple test per method is enough. This is mainly so that it’s easy to verify the Facade layer works;\r\n\r\nThere must be extensive unit tests for the service layer (particularly for your 2 business functions) and all the tests of service layer must use Mock DAO objects;","creator":{"login":"Arcidev","id":7854000,"avatar_url":"https://avatars.githubusercontent.com/u/7854000?v=3","gravatar_id":"","url":"https://api.github.com/users/Arcidev","html_url":"https://github.com/Arcidev","followers_url":"https://api.github.com/users/Arcidev/followers","following_url":"https://api.github.com/users/Arcidev/following{/other_user}","gists_url":"https://api.github.com/users/Arcidev/gists{/gist_id}","starred_url":"https://api.github.com/users/Arcidev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arcidev/subscriptions","organizations_url":"https://api.github.com/users/Arcidev/orgs","repos_url":"https://api.github.com/users/Arcidev/repos","events_url":"https://api.github.com/users/Arcidev/events{/privacy}","received_events_url":"https://api.github.com/users/Arcidev/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":4,"state":"open","created_at":"2015-11-22T22:51:49Z","updated_at":"2015-11-25T21:17:26Z","due_on":"2015-11-26T23:00:00Z","closed_at":null},"comments":0,"created_at":"2015-11-23T21:28:43Z","updated_at":"2015-11-25T21:17:26Z","closed_at":"2015-11-25T21:17:26Z","body":""}}