{"action":"created","comment":{"url":"https://api.github.com/repos/samarou/crm/pulls/comments/63834064","id":63834064,"diff_hunk":"@@ -0,0 +1,89 @@\n+package com.itechart.security.business.dao.impl;\n+\n+import java.util.List;\n+\n+import org.hibernate.Criteria;\n+import org.hibernate.Session;\n+import org.hibernate.criterion.MatchMode;\n+import org.hibernate.criterion.Projections;\n+import org.hibernate.criterion.Restrictions;\n+import org.springframework.stereotype.Repository;\n+import org.springframework.util.StringUtils;\n+\n+import com.itechart.security.business.dao.CompanyDao;\n+import com.itechart.security.business.filter.CompanyFilter;\n+import com.itechart.security.business.model.persistent.company.BusinessSphere;\n+import com.itechart.security.business.model.persistent.company.Company;\n+import com.itechart.security.business.model.persistent.company.CompanyType;\n+import com.itechart.security.business.model.persistent.company.EmployeeNumberCathegory;\n+import com.itechart.security.core.annotation.AclFilter;\n+import com.itechart.security.core.annotation.AclFilterRule;\n+import com.itechart.security.core.model.acl.Permission;\n+\n+@Repository\n+public class CompanyDaoImpl extends BaseHibernateDao<Company> implements CompanyDao {\n+\n+\t@Override\n+\t@AclFilter(@AclFilterRule(type = Company.class, permissions = {Permission.READ}))\n+    public List<Company> loadAll() {\n+\t\treturn super.loadAll();\n+\t}\n+\t\n+\t@Override\n+\tpublic Long save(Company company) {\n+\t\treturn (Long) super.save(company);\n+\t}\n+\n+\t@Override","path":"src/business-services/src/main/java/com/itechart/security/business/dao/impl/CompanyDaoImpl.java","position":37,"original_position":37,"commit_id":"bbcc35dcdc24ee0085b59345fcc412fb3d7e15c7","original_commit_id":"bbcc35dcdc24ee0085b59345fcc412fb3d7e15c7","user":{"login":"samarou","id":15816489,"avatar_url":"https://avatars.githubusercontent.com/u/15816489?v=3","gravatar_id":"","url":"https://api.github.com/users/samarou","html_url":"https://github.com/samarou","followers_url":"https://api.github.com/users/samarou/followers","following_url":"https://api.github.com/users/samarou/following{/other_user}","gists_url":"https://api.github.com/users/samarou/gists{/gist_id}","starred_url":"https://api.github.com/users/samarou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samarou/subscriptions","organizations_url":"https://api.github.com/users/samarou/orgs","repos_url":"https://api.github.com/users/samarou/repos","events_url":"https://api.github.com/users/samarou/events{/privacy}","received_events_url":"https://api.github.com/users/samarou/received_events","type":"User","site_admin":false},"body":"Тут наверное тоже AclFilter нужен?","created_at":"2016-05-19T07:36:26Z","updated_at":"2016-05-19T07:36:26Z","html_url":"https://github.com/samarou/crm/pull/25#discussion_r63834064","pull_request_url":"https://api.github.com/repos/samarou/crm/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/samarou/crm/pulls/comments/63834064"},"html":{"href":"https://github.com/samarou/crm/pull/25#discussion_r63834064"},"pull_request":{"href":"https://api.github.com/repos/samarou/crm/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/samarou/crm/pulls/25","id":70523502,"html_url":"https://github.com/samarou/crm/pull/25","diff_url":"https://github.com/samarou/crm/pull/25.diff","patch_url":"https://github.com/samarou/crm/pull/25.patch","issue_url":"https://api.github.com/repos/samarou/crm/issues/25","number":25,"state":"open","locked":false,"title":"Feature/551100","user":{"login":"alexander-tolstoy","id":19206055,"avatar_url":"https://avatars.githubusercontent.com/u/19206055?v=3","gravatar_id":"","url":"https://api.github.com/users/alexander-tolstoy","html_url":"https://github.com/alexander-tolstoy","followers_url":"https://api.github.com/users/alexander-tolstoy/followers","following_url":"https://api.github.com/users/alexander-tolstoy/following{/other_user}","gists_url":"https://api.github.com/users/alexander-tolstoy/gists{/gist_id}","starred_url":"https://api.github.com/users/alexander-tolstoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexander-tolstoy/subscriptions","organizations_url":"https://api.github.com/users/alexander-tolstoy/orgs","repos_url":"https://api.github.com/users/alexander-tolstoy/repos","events_url":"https://api.github.com/users/alexander-tolstoy/events{/privacy}","received_events_url":"https://api.github.com/users/alexander-tolstoy/received_events","type":"User","site_admin":false},"body":"Basic CRUD for Company entity.","created_at":"2016-05-18T13:02:31Z","updated_at":"2016-05-19T07:36:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f518bdced8d779faf8f0cfaf0f167ad10470570","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/samarou/crm/pulls/25/commits","review_comments_url":"https://api.github.com/repos/samarou/crm/pulls/25/comments","review_comment_url":"https://api.github.com/repos/samarou/crm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samarou/crm/issues/25/comments","statuses_url":"https://api.github.com/repos/samarou/crm/statuses/bbcc35dcdc24ee0085b59345fcc412fb3d7e15c7","head":{"label":"samarou:feature/551100","ref":"feature/551100","sha":"bbcc35dcdc24ee0085b59345fcc412fb3d7e15c7","user":{"login":"samarou","id":15816489,"avatar_url":"https://avatars.githubusercontent.com/u/15816489?v=3","gravatar_id":"","url":"https://api.github.com/users/samarou","html_url":"https://github.com/samarou","followers_url":"https://api.github.com/users/samarou/followers","following_url":"https://api.github.com/users/samarou/following{/other_user}","gists_url":"https://api.github.com/users/samarou/gists{/gist_id}","starred_url":"https://api.github.com/users/samarou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samarou/subscriptions","organizations_url":"https://api.github.com/users/samarou/orgs","repos_url":"https://api.github.com/users/samarou/repos","events_url":"https://api.github.com/users/samarou/events{/privacy}","received_events_url":"https://api.github.com/users/samarou/received_events","type":"User","site_admin":false},"repo":{"id":46051948,"name":"crm","full_name":"samarou/crm","owner":{"login":"samarou","id":15816489,"avatar_url":"https://avatars.githubusercontent.com/u/15816489?v=3","gravatar_id":"","url":"https://api.github.com/users/samarou","html_url":"https://github.com/samarou","followers_url":"https://api.github.com/users/samarou/followers","following_url":"https://api.github.com/users/samarou/following{/other_user}","gists_url":"https://api.github.com/users/samarou/gists{/gist_id}","starred_url":"https://api.github.com/users/samarou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samarou/subscriptions","organizations_url":"https://api.github.com/users/samarou/orgs","repos_url":"https://api.github.com/users/samarou/repos","events_url":"https://api.github.com/users/samarou/events{/privacy}","received_events_url":"https://api.github.com/users/samarou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samarou/crm","description":"","fork":false,"url":"https://api.github.com/repos/samarou/crm","forks_url":"https://api.github.com/repos/samarou/crm/forks","keys_url":"https://api.github.com/repos/samarou/crm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samarou/crm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samarou/crm/teams","hooks_url":"https://api.github.com/repos/samarou/crm/hooks","issue_events_url":"https://api.github.com/repos/samarou/crm/issues/events{/number}","events_url":"https://api.github.com/repos/samarou/crm/events","assignees_url":"https://api.github.com/repos/samarou/crm/assignees{/user}","branches_url":"https://api.github.com/repos/samarou/crm/branches{/branch}","tags_url":"https://api.github.com/repos/samarou/crm/tags","blobs_url":"https://api.github.com/repos/samarou/crm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samarou/crm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samarou/crm/git/refs{/sha}","trees_url":"https://api.github.com/repos/samarou/crm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samarou/crm/statuses/{sha}","languages_url":"https://api.github.com/repos/samarou/crm/languages","stargazers_url":"https://api.github.com/repos/samarou/crm/stargazers","contributors_url":"https://api.github.com/repos/samarou/crm/contributors","subscribers_url":"https://api.github.com/repos/samarou/crm/subscribers","subscription_url":"https://api.github.com/repos/samarou/crm/subscription","commits_url":"https://api.github.com/repos/samarou/crm/commits{/sha}","git_commits_url":"https://api.github.com/repos/samarou/crm/git/commits{/sha}","comments_url":"https://api.github.com/repos/samarou/crm/comments{/number}","issue_comment_url":"https://api.github.com/repos/samarou/crm/issues/comments{/number}","contents_url":"https://api.github.com/repos/samarou/crm/contents/{+path}","compare_url":"https://api.github.com/repos/samarou/crm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samarou/crm/merges","archive_url":"https://api.github.com/repos/samarou/crm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samarou/crm/downloads","issues_url":"https://api.github.com/repos/samarou/crm/issues{/number}","pulls_url":"https://api.github.com/repos/samarou/crm/pulls{/number}","milestones_url":"https://api.github.com/repos/samarou/crm/milestones{/number}","notifications_url":"https://api.github.com/repos/samarou/crm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samarou/crm/labels{/name}","releases_url":"https://api.github.com/repos/samarou/crm/releases{/id}","deployments_url":"https://api.github.com/repos/samarou/crm/deployments","created_at":"2015-11-12T12:38:23Z","updated_at":"2016-01-13T14:38:15Z","pushed_at":"2016-05-18T17:51:07Z","git_url":"git://github.com/samarou/crm.git","ssh_url":"git@github.com:samarou/crm.git","clone_url":"https://github.com/samarou/crm.git","svn_url":"https://github.com/samarou/crm","homepage":null,"size":1459,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"samarou:master","ref":"master","sha":"04428062d61b76087f32dd3ee484aa931c7da0ab","user":{"login":"samarou","id":15816489,"avatar_url":"https://avatars.githubusercontent.com/u/15816489?v=3","gravatar_id":"","url":"https://api.github.com/users/samarou","html_url":"https://github.com/samarou","followers_url":"https://api.github.com/users/samarou/followers","following_url":"https://api.github.com/users/samarou/following{/other_user}","gists_url":"https://api.github.com/users/samarou/gists{/gist_id}","starred_url":"https://api.github.com/users/samarou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samarou/subscriptions","organizations_url":"https://api.github.com/users/samarou/orgs","repos_url":"https://api.github.com/users/samarou/repos","events_url":"https://api.github.com/users/samarou/events{/privacy}","received_events_url":"https://api.github.com/users/samarou/received_events","type":"User","site_admin":false},"repo":{"id":46051948,"name":"crm","full_name":"samarou/crm","owner":{"login":"samarou","id":15816489,"avatar_url":"https://avatars.githubusercontent.com/u/15816489?v=3","gravatar_id":"","url":"https://api.github.com/users/samarou","html_url":"https://github.com/samarou","followers_url":"https://api.github.com/users/samarou/followers","following_url":"https://api.github.com/users/samarou/following{/other_user}","gists_url":"https://api.github.com/users/samarou/gists{/gist_id}","starred_url":"https://api.github.com/users/samarou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samarou/subscriptions","organizations_url":"https://api.github.com/users/samarou/orgs","repos_url":"https://api.github.com/users/samarou/repos","events_url":"https://api.github.com/users/samarou/events{/privacy}","received_events_url":"https://api.github.com/users/samarou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samarou/crm","description":"","fork":false,"url":"https://api.github.com/repos/samarou/crm","forks_url":"https://api.github.com/repos/samarou/crm/forks","keys_url":"https://api.github.com/repos/samarou/crm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samarou/crm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samarou/crm/teams","hooks_url":"https://api.github.com/repos/samarou/crm/hooks","issue_events_url":"https://api.github.com/repos/samarou/crm/issues/events{/number}","events_url":"https://api.github.com/repos/samarou/crm/events","assignees_url":"https://api.github.com/repos/samarou/crm/assignees{/user}","branches_url":"https://api.github.com/repos/samarou/crm/branches{/branch}","tags_url":"https://api.github.com/repos/samarou/crm/tags","blobs_url":"https://api.github.com/repos/samarou/crm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samarou/crm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samarou/crm/git/refs{/sha}","trees_url":"https://api.github.com/repos/samarou/crm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samarou/crm/statuses/{sha}","languages_url":"https://api.github.com/repos/samarou/crm/languages","stargazers_url":"https://api.github.com/repos/samarou/crm/stargazers","contributors_url":"https://api.github.com/repos/samarou/crm/contributors","subscribers_url":"https://api.github.com/repos/samarou/crm/subscribers","subscription_url":"https://api.github.com/repos/samarou/crm/subscription","commits_url":"https://api.github.com/repos/samarou/crm/commits{/sha}","git_commits_url":"https://api.github.com/repos/samarou/crm/git/commits{/sha}","comments_url":"https://api.github.com/repos/samarou/crm/comments{/number}","issue_comment_url":"https://api.github.com/repos/samarou/crm/issues/comments{/number}","contents_url":"https://api.github.com/repos/samarou/crm/contents/{+path}","compare_url":"https://api.github.com/repos/samarou/crm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samarou/crm/merges","archive_url":"https://api.github.com/repos/samarou/crm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samarou/crm/downloads","issues_url":"https://api.github.com/repos/samarou/crm/issues{/number}","pulls_url":"https://api.github.com/repos/samarou/crm/pulls{/number}","milestones_url":"https://api.github.com/repos/samarou/crm/milestones{/number}","notifications_url":"https://api.github.com/repos/samarou/crm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samarou/crm/labels{/name}","releases_url":"https://api.github.com/repos/samarou/crm/releases{/id}","deployments_url":"https://api.github.com/repos/samarou/crm/deployments","created_at":"2015-11-12T12:38:23Z","updated_at":"2016-01-13T14:38:15Z","pushed_at":"2016-05-18T17:51:07Z","git_url":"git://github.com/samarou/crm.git","ssh_url":"git@github.com:samarou/crm.git","clone_url":"https://github.com/samarou/crm.git","svn_url":"https://github.com/samarou/crm","homepage":null,"size":1459,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/samarou/crm/pulls/25"},"html":{"href":"https://github.com/samarou/crm/pull/25"},"issue":{"href":"https://api.github.com/repos/samarou/crm/issues/25"},"comments":{"href":"https://api.github.com/repos/samarou/crm/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/samarou/crm/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/samarou/crm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samarou/crm/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/samarou/crm/statuses/bbcc35dcdc24ee0085b59345fcc412fb3d7e15c7"}}}}