{"action":"created","comment":{"url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/comments/27195815","id":27195815,"diff_hunk":"@@ -26,72 +32,80 @@\n     @EJB\n     private AuthorHomeLocal authorHome;\n \n-    @Override\n     @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)\n-    public Author save(Author obj) throws EntityPersistenceException{\n-\n+    public Author save(Author obj) throws EntityManagerException {\n+        logger.debug(\"save invoked for object: {}\", obj);\n         Author entity;\n         try {\n             entity = authorHome.save(obj);\n         } catch (Exception e) {\n             String errorMsg = \"Failed to persist object: {}\";\n-            LOG.error(errorMsg, obj);\n-            throw new EntityPersistenceException(errorMsg, e);\n+            logger.error(errorMsg, obj);\n+            throw new EntityManagerException(errorMsg, e);\n         }\n-        LOG.debug(\"Persist entity: {}\", entity);\n+        logger.debug(\"Persist entity: {}\", entity);\n         return entity;\n     }\n \n-    @Override\n-    public Author update(Author obj) throws EntityPersistenceException {\n+    public Author update(Author obj) throws EntityManagerException {\n+        logger.debug(\"update invoked for obj: {}\", obj);\n         Author updated;\n         try {\n             updated = authorHome.update(obj);\n         } catch (Exception e) {\n             String errorMsg = \"Failed to update object: {}\";\n-            LOG.error(errorMsg, obj);\n-            throw new EntityPersistenceException(errorMsg, e);\n+            logger.error(errorMsg, obj);\n+            throw new EntityManagerException(errorMsg, e);\n         }\n-        LOG.debug(\"Update entity: {}\", updated);\n+        logger.debug(\"Update entity: {}\", updated);\n         return updated;\n     }\n \n-    @Override\n-    public void remove(EntityIdentifier key) throws EntityPersistenceException {\n+    public void removeByPk(EntityIdentifier key) throws EntityManagerException {\n+        logger.debug(\"Remove called for entity with key: {}\", key);\n         try {\n-            authorHome.remove(key);\n+            authorHome.removeByPk(key);\n         } catch (Exception e) {\n-            String errorMsg = \"Failed to remove object with pk: {}\";\n-            LOG.error(errorMsg, key);\n-            throw new EntityPersistenceException(errorMsg, e);\n+            String errorMsg = \"Failed to remove object with key: {}\";\n+            logger.error(errorMsg, key);\n+            throw new EntityManagerException(errorMsg, e);\n         }\n-        LOG.debug(\"Remove entity with pk: {}\", key);\n     }\n \n-    @Override\n-    public void remove(String uuid) throws EntityPersistenceException{\n-\n+    public void removeByUuid(String uuid) throws EntityManagerException {\n+        removeByPk(new EntityIdentifier(uuid));\n     }\n \n-    @Override\n-    public void removeAll() throws EntityPersistenceException{\n-\n+    public void removeAll() throws EntityManagerException {\n+        logger.debug(\"Remove all invoked\");\n+        try {\n+            authorHome.removeAll();\n+        } catch (Exception e) {\n+            String errorMsg = \"Failed to remove all objects \";\n+            logger.error(errorMsg);\n+            throw new EntityManagerException(errorMsg, e);\n+        }\n     }\n \n-    @Override\n     public Author findByPk(EntityIdentifier key) {\n-        return null;\n+        logger.debug(\"Find invoked for object with key: {}\", key);\n+        return authorFacade.findByPk(key);\n     }\n \n-    @Override\n     public Author findByUuid(String uuid) {\n-\n+        logger.debug(\"Find invoked for object with key: {}\", uuid);\n         return authorFacade.findByUuid(uuid);\n     }\n \n-    @Override\n     public List<Author> findAll() {\n+        logger.debug(\"Find all called\");\n+        List<Author> authors =  authorFacade.findAll();","path":"BookLibrary-cdi/src/main/java/org/booklibrary/app/manager/beans/AuthorManager.java","position":138,"original_position":138,"commit_id":"8043bee175adbe6c823aa37b2f19817574f8f7de","original_commit_id":"8043bee175adbe6c823aa37b2f19817574f8f7de","user":{"login":"oleksandr-horobets","id":5139207,"avatar_url":"https://avatars.githubusercontent.com/u/5139207?v=3","gravatar_id":"","url":"https://api.github.com/users/oleksandr-horobets","html_url":"https://github.com/oleksandr-horobets","followers_url":"https://api.github.com/users/oleksandr-horobets/followers","following_url":"https://api.github.com/users/oleksandr-horobets/following{/other_user}","gists_url":"https://api.github.com/users/oleksandr-horobets/gists{/gist_id}","starred_url":"https://api.github.com/users/oleksandr-horobets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleksandr-horobets/subscriptions","organizations_url":"https://api.github.com/users/oleksandr-horobets/orgs","repos_url":"https://api.github.com/users/oleksandr-horobets/repos","events_url":"https://api.github.com/users/oleksandr-horobets/events{/privacy}","received_events_url":"https://api.github.com/users/oleksandr-horobets/received_events","type":"User","site_admin":false},"body":"there is no need in creating local variable here, just return authorFacade.findAll()","created_at":"2015-03-26T08:46:58Z","updated_at":"2015-03-26T08:46:58Z","html_url":"https://github.com/EugeneKopaev/BookLibrary/pull/12#discussion_r27195815","pull_request_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/comments/27195815"},"html":{"href":"https://github.com/EugeneKopaev/BookLibrary/pull/12#discussion_r27195815"},"pull_request":{"href":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/12","id":31916356,"html_url":"https://github.com/EugeneKopaev/BookLibrary/pull/12","diff_url":"https://github.com/EugeneKopaev/BookLibrary/pull/12.diff","patch_url":"https://github.com/EugeneKopaev/BookLibrary/pull/12.patch","issue_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/issues/12","number":12,"state":"open","locked":false,"title":"Rest authors","user":{"login":"EugeneKopaev","id":6379523,"avatar_url":"https://avatars.githubusercontent.com/u/6379523?v=3","gravatar_id":"","url":"https://api.github.com/users/EugeneKopaev","html_url":"https://github.com/EugeneKopaev","followers_url":"https://api.github.com/users/EugeneKopaev/followers","following_url":"https://api.github.com/users/EugeneKopaev/following{/other_user}","gists_url":"https://api.github.com/users/EugeneKopaev/gists{/gist_id}","starred_url":"https://api.github.com/users/EugeneKopaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EugeneKopaev/subscriptions","organizations_url":"https://api.github.com/users/EugeneKopaev/orgs","repos_url":"https://api.github.com/users/EugeneKopaev/repos","events_url":"https://api.github.com/users/EugeneKopaev/events{/privacy}","received_events_url":"https://api.github.com/users/EugeneKopaev/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-25T12:14:30Z","updated_at":"2015-03-26T08:46:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d74619c72401e857762ca1de485b920a3f8fdb2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/12/commits","review_comments_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/12/comments","review_comment_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/issues/12/comments","statuses_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/statuses/8043bee175adbe6c823aa37b2f19817574f8f7de","head":{"label":"EugeneKopaev:rest-authors","ref":"rest-authors","sha":"8043bee175adbe6c823aa37b2f19817574f8f7de","user":{"login":"EugeneKopaev","id":6379523,"avatar_url":"https://avatars.githubusercontent.com/u/6379523?v=3","gravatar_id":"","url":"https://api.github.com/users/EugeneKopaev","html_url":"https://github.com/EugeneKopaev","followers_url":"https://api.github.com/users/EugeneKopaev/followers","following_url":"https://api.github.com/users/EugeneKopaev/following{/other_user}","gists_url":"https://api.github.com/users/EugeneKopaev/gists{/gist_id}","starred_url":"https://api.github.com/users/EugeneKopaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EugeneKopaev/subscriptions","organizations_url":"https://api.github.com/users/EugeneKopaev/orgs","repos_url":"https://api.github.com/users/EugeneKopaev/repos","events_url":"https://api.github.com/users/EugeneKopaev/events{/privacy}","received_events_url":"https://api.github.com/users/EugeneKopaev/received_events","type":"User","site_admin":false},"repo":{"id":31268693,"name":"BookLibrary","full_name":"EugeneKopaev/BookLibrary","owner":{"login":"EugeneKopaev","id":6379523,"avatar_url":"https://avatars.githubusercontent.com/u/6379523?v=3","gravatar_id":"","url":"https://api.github.com/users/EugeneKopaev","html_url":"https://github.com/EugeneKopaev","followers_url":"https://api.github.com/users/EugeneKopaev/followers","following_url":"https://api.github.com/users/EugeneKopaev/following{/other_user}","gists_url":"https://api.github.com/users/EugeneKopaev/gists{/gist_id}","starred_url":"https://api.github.com/users/EugeneKopaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EugeneKopaev/subscriptions","organizations_url":"https://api.github.com/users/EugeneKopaev/orgs","repos_url":"https://api.github.com/users/EugeneKopaev/repos","events_url":"https://api.github.com/users/EugeneKopaev/events{/privacy}","received_events_url":"https://api.github.com/users/EugeneKopaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EugeneKopaev/BookLibrary","description":"","fork":false,"url":"https://api.github.com/repos/EugeneKopaev/BookLibrary","forks_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/forks","keys_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/teams","hooks_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/hooks","issue_events_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/issues/events{/number}","events_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/events","assignees_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/assignees{/user}","branches_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/branches{/branch}","tags_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/tags","blobs_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/git/refs{/sha}","trees_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/statuses/{sha}","languages_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/languages","stargazers_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/stargazers","contributors_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/contributors","subscribers_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/subscribers","subscription_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/subscription","commits_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/commits{/sha}","git_commits_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/git/commits{/sha}","comments_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/comments{/number}","issue_comment_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/issues/comments{/number}","contents_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/contents/{+path}","compare_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/merges","archive_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/downloads","issues_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/issues{/number}","pulls_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls{/number}","milestones_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/milestones{/number}","notifications_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/labels{/name}","releases_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/releases{/id}","created_at":"2015-02-24T16:14:35Z","updated_at":"2015-03-26T08:27:10Z","pushed_at":"2015-03-26T08:27:14Z","git_url":"git://github.com/EugeneKopaev/BookLibrary.git","ssh_url":"git@github.com:EugeneKopaev/BookLibrary.git","clone_url":"https://github.com/EugeneKopaev/BookLibrary.git","svn_url":"https://github.com/EugeneKopaev/BookLibrary","homepage":null,"size":296,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"EugeneKopaev:master","ref":"master","sha":"6e0204751cb94c7aa0f70d4baad1f1f004679f9a","user":{"login":"EugeneKopaev","id":6379523,"avatar_url":"https://avatars.githubusercontent.com/u/6379523?v=3","gravatar_id":"","url":"https://api.github.com/users/EugeneKopaev","html_url":"https://github.com/EugeneKopaev","followers_url":"https://api.github.com/users/EugeneKopaev/followers","following_url":"https://api.github.com/users/EugeneKopaev/following{/other_user}","gists_url":"https://api.github.com/users/EugeneKopaev/gists{/gist_id}","starred_url":"https://api.github.com/users/EugeneKopaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EugeneKopaev/subscriptions","organizations_url":"https://api.github.com/users/EugeneKopaev/orgs","repos_url":"https://api.github.com/users/EugeneKopaev/repos","events_url":"https://api.github.com/users/EugeneKopaev/events{/privacy}","received_events_url":"https://api.github.com/users/EugeneKopaev/received_events","type":"User","site_admin":false},"repo":{"id":31268693,"name":"BookLibrary","full_name":"EugeneKopaev/BookLibrary","owner":{"login":"EugeneKopaev","id":6379523,"avatar_url":"https://avatars.githubusercontent.com/u/6379523?v=3","gravatar_id":"","url":"https://api.github.com/users/EugeneKopaev","html_url":"https://github.com/EugeneKopaev","followers_url":"https://api.github.com/users/EugeneKopaev/followers","following_url":"https://api.github.com/users/EugeneKopaev/following{/other_user}","gists_url":"https://api.github.com/users/EugeneKopaev/gists{/gist_id}","starred_url":"https://api.github.com/users/EugeneKopaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EugeneKopaev/subscriptions","organizations_url":"https://api.github.com/users/EugeneKopaev/orgs","repos_url":"https://api.github.com/users/EugeneKopaev/repos","events_url":"https://api.github.com/users/EugeneKopaev/events{/privacy}","received_events_url":"https://api.github.com/users/EugeneKopaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EugeneKopaev/BookLibrary","description":"","fork":false,"url":"https://api.github.com/repos/EugeneKopaev/BookLibrary","forks_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/forks","keys_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/teams","hooks_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/hooks","issue_events_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/issues/events{/number}","events_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/events","assignees_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/assignees{/user}","branches_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/branches{/branch}","tags_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/tags","blobs_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/git/refs{/sha}","trees_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/statuses/{sha}","languages_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/languages","stargazers_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/stargazers","contributors_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/contributors","subscribers_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/subscribers","subscription_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/subscription","commits_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/commits{/sha}","git_commits_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/git/commits{/sha}","comments_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/comments{/number}","issue_comment_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/issues/comments{/number}","contents_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/contents/{+path}","compare_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/merges","archive_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/downloads","issues_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/issues{/number}","pulls_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls{/number}","milestones_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/milestones{/number}","notifications_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/labels{/name}","releases_url":"https://api.github.com/repos/EugeneKopaev/BookLibrary/releases{/id}","created_at":"2015-02-24T16:14:35Z","updated_at":"2015-03-26T08:27:10Z","pushed_at":"2015-03-26T08:27:14Z","git_url":"git://github.com/EugeneKopaev/BookLibrary.git","ssh_url":"git@github.com:EugeneKopaev/BookLibrary.git","clone_url":"https://github.com/EugeneKopaev/BookLibrary.git","svn_url":"https://github.com/EugeneKopaev/BookLibrary","homepage":null,"size":296,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/12"},"html":{"href":"https://github.com/EugeneKopaev/BookLibrary/pull/12"},"issue":{"href":"https://api.github.com/repos/EugeneKopaev/BookLibrary/issues/12"},"comments":{"href":"https://api.github.com/repos/EugeneKopaev/BookLibrary/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EugeneKopaev/BookLibrary/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/EugeneKopaev/BookLibrary/statuses/8043bee175adbe6c823aa37b2f19817574f8f7de"}}}}