{"action":"created","comment":{"url":"https://api.github.com/repos/KateGuz/salesa/pulls/comments/58512466","id":58512466,"diff_hunk":"@@ -9,14 +10,24 @@\n import java.util.List;\n \n @Repository\n-public class AdvertJdbcDao implements AdvertDao {\n+public class AdvertJdbcAdvertDao implements AdvertDao {\n     private static final String GET_ALL_SQL = \"SELECT * FROM advert;\";\n-\n     @Autowired\n     private JdbcTemplate jdbcTemplate;\n \n     @Override\n-    public List<Advert> getAll() {\n+    public List<Advert> get(UserFilter userFilter) {\n+        int categoryId = userFilter.getCategoryId();\n+\n+        String GET_ALL_BY_FILTER = \"SELECT * FROM advert WHERE \" +\n+                \"(categoryId = \" + categoryId + \")\" +\n+                \"ORDER BY id ASC\" + \" limit 9\";","path":"src/main/java/com/salesa/dao/AdvertJdbcAdvertDao.java","position":25,"original_position":25,"commit_id":"0e33c1a7aab69937e96a3e1d8240f3f9c43e5d80","original_commit_id":"0e33c1a7aab69937e96a3e1d8240f3f9c43e5d80","user":{"login":"KateGuz","id":17382090,"avatar_url":"https://avatars.githubusercontent.com/u/17382090?v=3","gravatar_id":"","url":"https://api.github.com/users/KateGuz","html_url":"https://github.com/KateGuz","followers_url":"https://api.github.com/users/KateGuz/followers","following_url":"https://api.github.com/users/KateGuz/following{/other_user}","gists_url":"https://api.github.com/users/KateGuz/gists{/gist_id}","starred_url":"https://api.github.com/users/KateGuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KateGuz/subscriptions","organizations_url":"https://api.github.com/users/KateGuz/orgs","repos_url":"https://api.github.com/users/KateGuz/repos","events_url":"https://api.github.com/users/KateGuz/events{/privacy}","received_events_url":"https://api.github.com/users/KateGuz/received_events","type":"User","site_admin":false},"body":"лимин не нужен здесь. это дао класс, он должен все считывать с бд правильно. заглушку для вывода только 9 записей мы ставим на уровне сервисов","created_at":"2016-04-05T10:02:15Z","updated_at":"2016-04-05T10:02:15Z","html_url":"https://github.com/KateGuz/salesa/pull/5#discussion_r58512466","pull_request_url":"https://api.github.com/repos/KateGuz/salesa/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/KateGuz/salesa/pulls/comments/58512466"},"html":{"href":"https://github.com/KateGuz/salesa/pull/5#discussion_r58512466"},"pull_request":{"href":"https://api.github.com/repos/KateGuz/salesa/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/KateGuz/salesa/pulls/5","id":65211369,"html_url":"https://github.com/KateGuz/salesa/pull/5","diff_url":"https://github.com/KateGuz/salesa/pull/5.diff","patch_url":"https://github.com/KateGuz/salesa/pull/5.patch","issue_url":"https://api.github.com/repos/KateGuz/salesa/issues/5","number":5,"state":"open","locked":false,"title":"Implemeted filter by category, added service,enum, filter class. Fixe…","user":{"login":"Atarki","id":11487017,"avatar_url":"https://avatars.githubusercontent.com/u/11487017?v=3","gravatar_id":"","url":"https://api.github.com/users/Atarki","html_url":"https://github.com/Atarki","followers_url":"https://api.github.com/users/Atarki/followers","following_url":"https://api.github.com/users/Atarki/following{/other_user}","gists_url":"https://api.github.com/users/Atarki/gists{/gist_id}","starred_url":"https://api.github.com/users/Atarki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Atarki/subscriptions","organizations_url":"https://api.github.com/users/Atarki/orgs","repos_url":"https://api.github.com/users/Atarki/repos","events_url":"https://api.github.com/users/Atarki/events{/privacy}","received_events_url":"https://api.github.com/users/Atarki/received_events","type":"User","site_admin":false},"body":"Impleneted filter by category, added service,enum, filter class. Fixed utf-8 jsp","created_at":"2016-04-04T20:55:07Z","updated_at":"2016-04-05T10:02:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/KateGuz/salesa/pulls/5/commits","review_comments_url":"https://api.github.com/repos/KateGuz/salesa/pulls/5/comments","review_comment_url":"https://api.github.com/repos/KateGuz/salesa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KateGuz/salesa/issues/5/comments","statuses_url":"https://api.github.com/repos/KateGuz/salesa/statuses/0e33c1a7aab69937e96a3e1d8240f3f9c43e5d80","head":{"label":"KateGuz:add-filtering-by-category","ref":"add-filtering-by-category","sha":"0e33c1a7aab69937e96a3e1d8240f3f9c43e5d80","user":{"login":"KateGuz","id":17382090,"avatar_url":"https://avatars.githubusercontent.com/u/17382090?v=3","gravatar_id":"","url":"https://api.github.com/users/KateGuz","html_url":"https://github.com/KateGuz","followers_url":"https://api.github.com/users/KateGuz/followers","following_url":"https://api.github.com/users/KateGuz/following{/other_user}","gists_url":"https://api.github.com/users/KateGuz/gists{/gist_id}","starred_url":"https://api.github.com/users/KateGuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KateGuz/subscriptions","organizations_url":"https://api.github.com/users/KateGuz/orgs","repos_url":"https://api.github.com/users/KateGuz/repos","events_url":"https://api.github.com/users/KateGuz/events{/privacy}","received_events_url":"https://api.github.com/users/KateGuz/received_events","type":"User","site_admin":false},"repo":{"id":55182487,"name":"salesa","full_name":"KateGuz/salesa","owner":{"login":"KateGuz","id":17382090,"avatar_url":"https://avatars.githubusercontent.com/u/17382090?v=3","gravatar_id":"","url":"https://api.github.com/users/KateGuz","html_url":"https://github.com/KateGuz","followers_url":"https://api.github.com/users/KateGuz/followers","following_url":"https://api.github.com/users/KateGuz/following{/other_user}","gists_url":"https://api.github.com/users/KateGuz/gists{/gist_id}","starred_url":"https://api.github.com/users/KateGuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KateGuz/subscriptions","organizations_url":"https://api.github.com/users/KateGuz/orgs","repos_url":"https://api.github.com/users/KateGuz/repos","events_url":"https://api.github.com/users/KateGuz/events{/privacy}","received_events_url":"https://api.github.com/users/KateGuz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KateGuz/salesa","description":"","fork":false,"url":"https://api.github.com/repos/KateGuz/salesa","forks_url":"https://api.github.com/repos/KateGuz/salesa/forks","keys_url":"https://api.github.com/repos/KateGuz/salesa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KateGuz/salesa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KateGuz/salesa/teams","hooks_url":"https://api.github.com/repos/KateGuz/salesa/hooks","issue_events_url":"https://api.github.com/repos/KateGuz/salesa/issues/events{/number}","events_url":"https://api.github.com/repos/KateGuz/salesa/events","assignees_url":"https://api.github.com/repos/KateGuz/salesa/assignees{/user}","branches_url":"https://api.github.com/repos/KateGuz/salesa/branches{/branch}","tags_url":"https://api.github.com/repos/KateGuz/salesa/tags","blobs_url":"https://api.github.com/repos/KateGuz/salesa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KateGuz/salesa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KateGuz/salesa/git/refs{/sha}","trees_url":"https://api.github.com/repos/KateGuz/salesa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KateGuz/salesa/statuses/{sha}","languages_url":"https://api.github.com/repos/KateGuz/salesa/languages","stargazers_url":"https://api.github.com/repos/KateGuz/salesa/stargazers","contributors_url":"https://api.github.com/repos/KateGuz/salesa/contributors","subscribers_url":"https://api.github.com/repos/KateGuz/salesa/subscribers","subscription_url":"https://api.github.com/repos/KateGuz/salesa/subscription","commits_url":"https://api.github.com/repos/KateGuz/salesa/commits{/sha}","git_commits_url":"https://api.github.com/repos/KateGuz/salesa/git/commits{/sha}","comments_url":"https://api.github.com/repos/KateGuz/salesa/comments{/number}","issue_comment_url":"https://api.github.com/repos/KateGuz/salesa/issues/comments{/number}","contents_url":"https://api.github.com/repos/KateGuz/salesa/contents/{+path}","compare_url":"https://api.github.com/repos/KateGuz/salesa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KateGuz/salesa/merges","archive_url":"https://api.github.com/repos/KateGuz/salesa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KateGuz/salesa/downloads","issues_url":"https://api.github.com/repos/KateGuz/salesa/issues{/number}","pulls_url":"https://api.github.com/repos/KateGuz/salesa/pulls{/number}","milestones_url":"https://api.github.com/repos/KateGuz/salesa/milestones{/number}","notifications_url":"https://api.github.com/repos/KateGuz/salesa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KateGuz/salesa/labels{/name}","releases_url":"https://api.github.com/repos/KateGuz/salesa/releases{/id}","deployments_url":"https://api.github.com/repos/KateGuz/salesa/deployments","created_at":"2016-03-31T20:57:31Z","updated_at":"2016-03-31T21:07:23Z","pushed_at":"2016-04-04T20:55:07Z","git_url":"git://github.com/KateGuz/salesa.git","ssh_url":"git@github.com:KateGuz/salesa.git","clone_url":"https://github.com/KateGuz/salesa.git","svn_url":"https://github.com/KateGuz/salesa","homepage":null,"size":32,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"KateGuz:master","ref":"master","sha":"7c02b612b42ac3ed4f31f249b118fb3419eb9fb5","user":{"login":"KateGuz","id":17382090,"avatar_url":"https://avatars.githubusercontent.com/u/17382090?v=3","gravatar_id":"","url":"https://api.github.com/users/KateGuz","html_url":"https://github.com/KateGuz","followers_url":"https://api.github.com/users/KateGuz/followers","following_url":"https://api.github.com/users/KateGuz/following{/other_user}","gists_url":"https://api.github.com/users/KateGuz/gists{/gist_id}","starred_url":"https://api.github.com/users/KateGuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KateGuz/subscriptions","organizations_url":"https://api.github.com/users/KateGuz/orgs","repos_url":"https://api.github.com/users/KateGuz/repos","events_url":"https://api.github.com/users/KateGuz/events{/privacy}","received_events_url":"https://api.github.com/users/KateGuz/received_events","type":"User","site_admin":false},"repo":{"id":55182487,"name":"salesa","full_name":"KateGuz/salesa","owner":{"login":"KateGuz","id":17382090,"avatar_url":"https://avatars.githubusercontent.com/u/17382090?v=3","gravatar_id":"","url":"https://api.github.com/users/KateGuz","html_url":"https://github.com/KateGuz","followers_url":"https://api.github.com/users/KateGuz/followers","following_url":"https://api.github.com/users/KateGuz/following{/other_user}","gists_url":"https://api.github.com/users/KateGuz/gists{/gist_id}","starred_url":"https://api.github.com/users/KateGuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KateGuz/subscriptions","organizations_url":"https://api.github.com/users/KateGuz/orgs","repos_url":"https://api.github.com/users/KateGuz/repos","events_url":"https://api.github.com/users/KateGuz/events{/privacy}","received_events_url":"https://api.github.com/users/KateGuz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KateGuz/salesa","description":"","fork":false,"url":"https://api.github.com/repos/KateGuz/salesa","forks_url":"https://api.github.com/repos/KateGuz/salesa/forks","keys_url":"https://api.github.com/repos/KateGuz/salesa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KateGuz/salesa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KateGuz/salesa/teams","hooks_url":"https://api.github.com/repos/KateGuz/salesa/hooks","issue_events_url":"https://api.github.com/repos/KateGuz/salesa/issues/events{/number}","events_url":"https://api.github.com/repos/KateGuz/salesa/events","assignees_url":"https://api.github.com/repos/KateGuz/salesa/assignees{/user}","branches_url":"https://api.github.com/repos/KateGuz/salesa/branches{/branch}","tags_url":"https://api.github.com/repos/KateGuz/salesa/tags","blobs_url":"https://api.github.com/repos/KateGuz/salesa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KateGuz/salesa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KateGuz/salesa/git/refs{/sha}","trees_url":"https://api.github.com/repos/KateGuz/salesa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KateGuz/salesa/statuses/{sha}","languages_url":"https://api.github.com/repos/KateGuz/salesa/languages","stargazers_url":"https://api.github.com/repos/KateGuz/salesa/stargazers","contributors_url":"https://api.github.com/repos/KateGuz/salesa/contributors","subscribers_url":"https://api.github.com/repos/KateGuz/salesa/subscribers","subscription_url":"https://api.github.com/repos/KateGuz/salesa/subscription","commits_url":"https://api.github.com/repos/KateGuz/salesa/commits{/sha}","git_commits_url":"https://api.github.com/repos/KateGuz/salesa/git/commits{/sha}","comments_url":"https://api.github.com/repos/KateGuz/salesa/comments{/number}","issue_comment_url":"https://api.github.com/repos/KateGuz/salesa/issues/comments{/number}","contents_url":"https://api.github.com/repos/KateGuz/salesa/contents/{+path}","compare_url":"https://api.github.com/repos/KateGuz/salesa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KateGuz/salesa/merges","archive_url":"https://api.github.com/repos/KateGuz/salesa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KateGuz/salesa/downloads","issues_url":"https://api.github.com/repos/KateGuz/salesa/issues{/number}","pulls_url":"https://api.github.com/repos/KateGuz/salesa/pulls{/number}","milestones_url":"https://api.github.com/repos/KateGuz/salesa/milestones{/number}","notifications_url":"https://api.github.com/repos/KateGuz/salesa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KateGuz/salesa/labels{/name}","releases_url":"https://api.github.com/repos/KateGuz/salesa/releases{/id}","deployments_url":"https://api.github.com/repos/KateGuz/salesa/deployments","created_at":"2016-03-31T20:57:31Z","updated_at":"2016-03-31T21:07:23Z","pushed_at":"2016-04-04T20:55:07Z","git_url":"git://github.com/KateGuz/salesa.git","ssh_url":"git@github.com:KateGuz/salesa.git","clone_url":"https://github.com/KateGuz/salesa.git","svn_url":"https://github.com/KateGuz/salesa","homepage":null,"size":32,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KateGuz/salesa/pulls/5"},"html":{"href":"https://github.com/KateGuz/salesa/pull/5"},"issue":{"href":"https://api.github.com/repos/KateGuz/salesa/issues/5"},"comments":{"href":"https://api.github.com/repos/KateGuz/salesa/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/KateGuz/salesa/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/KateGuz/salesa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KateGuz/salesa/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/KateGuz/salesa/statuses/0e33c1a7aab69937e96a3e1d8240f3f9c43e5d80"}}}}