{"action":"created","comment":{"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/comments/74399315","id":74399315,"diff_hunk":"@@ -0,0 +1,45 @@\n+package eu.execom.labs.teamodoro.service;\n+\n+import java.util.Arrays;\n+import java.util.List;\n+import java.util.Set;\n+import java.util.TreeSet;\n+\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.stereotype.Service;\n+import org.springframework.transaction.annotation.Transactional;\n+\n+import eu.execom.labs.teamodoro.entity.Team;\n+import eu.execom.labs.teamodoro.entity.User;\n+import eu.execom.labs.teamodoro.repository.TeamRepository;\n+import eu.execom.labs.teamodoro.repository.UserRepository;\n+\n+@Service\n+public class UserService {\n+\n+    @Autowired\n+    UserRepository userRepository;\n+\n+    @Autowired\n+    TeamRepository teamRepository;\n+\n+    /**\n+     * Result of this method is set of user't which are part of same team where is current user{id}\n+     */\n+    @Transactional\n+    public Set<User> findAllTeamsUsers(long id) {\n+        Set<User> users = new TreeSet<>();\n+        User user = userRepository.findOne(id);\n+        List<Team> teams = teamRepository.findByUsers(Arrays.asList(user));","path":"src/main/java/eu/execom/labs/teamodoro/service/UserService.java","position":33,"original_position":33,"commit_id":"1bf9886388784b346d29df31772125a5e106c5cd","original_commit_id":"1bf9886388784b346d29df31772125a5e106c5cd","user":{"login":"dufajlusi","id":19993915,"avatar_url":"https://avatars.githubusercontent.com/u/19993915?v=3","gravatar_id":"","url":"https://api.github.com/users/dufajlusi","html_url":"https://github.com/dufajlusi","followers_url":"https://api.github.com/users/dufajlusi/followers","following_url":"https://api.github.com/users/dufajlusi/following{/other_user}","gists_url":"https://api.github.com/users/dufajlusi/gists{/gist_id}","starred_url":"https://api.github.com/users/dufajlusi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dufajlusi/subscriptions","organizations_url":"https://api.github.com/users/dufajlusi/orgs","repos_url":"https://api.github.com/users/dufajlusi/repos","events_url":"https://api.github.com/users/dufajlusi/events{/privacy}","received_events_url":"https://api.github.com/users/dufajlusi/received_events","type":"User","site_admin":false},"body":"Maybe you shoud have some method findByUsers_Id ... ","created_at":"2016-08-11T10:27:52Z","updated_at":"2016-08-11T10:27:52Z","html_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/4#discussion_r74399315","pull_request_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/comments/74399315"},"html":{"href":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/4#discussion_r74399315"},"pull_request":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/4","id":80916124,"html_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/4","diff_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/4.diff","patch_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/4.patch","issue_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/4","number":4,"state":"open","locked":false,"title":"Created team functionality","user":{"login":"mlcvijetinovic","id":20903101,"avatar_url":"https://avatars.githubusercontent.com/u/20903101?v=3","gravatar_id":"","url":"https://api.github.com/users/mlcvijetinovic","html_url":"https://github.com/mlcvijetinovic","followers_url":"https://api.github.com/users/mlcvijetinovic/followers","following_url":"https://api.github.com/users/mlcvijetinovic/following{/other_user}","gists_url":"https://api.github.com/users/mlcvijetinovic/gists{/gist_id}","starred_url":"https://api.github.com/users/mlcvijetinovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlcvijetinovic/subscriptions","organizations_url":"https://api.github.com/users/mlcvijetinovic/orgs","repos_url":"https://api.github.com/users/mlcvijetinovic/repos","events_url":"https://api.github.com/users/mlcvijetinovic/events{/privacy}","received_events_url":"https://api.github.com/users/mlcvijetinovic/received_events","type":"User","site_admin":false},"body":"For this functionality added method's in all backend layers.","created_at":"2016-08-11T07:50:41Z","updated_at":"2016-08-11T10:27:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"319cf2b6baba971f5bad024b9eebc731304d4526","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/4/commits","review_comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/4/comments","review_comment_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/4/comments","statuses_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/statuses/1bf9886388784b346d29df31772125a5e106c5cd","head":{"label":"execom-eu:master-mcvijetinovic-create-team-functionality","ref":"master-mcvijetinovic-create-team-functionality","sha":"1bf9886388784b346d29df31772125a5e106c5cd","user":{"login":"execom-eu","id":5187957,"avatar_url":"https://avatars.githubusercontent.com/u/5187957?v=3","gravatar_id":"","url":"https://api.github.com/users/execom-eu","html_url":"https://github.com/execom-eu","followers_url":"https://api.github.com/users/execom-eu/followers","following_url":"https://api.github.com/users/execom-eu/following{/other_user}","gists_url":"https://api.github.com/users/execom-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/execom-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/execom-eu/subscriptions","organizations_url":"https://api.github.com/users/execom-eu/orgs","repos_url":"https://api.github.com/users/execom-eu/repos","events_url":"https://api.github.com/users/execom-eu/events{/privacy}","received_events_url":"https://api.github.com/users/execom-eu/received_events","type":"Organization","site_admin":false},"repo":{"id":65188077,"name":"execom-labs-team-pomodoro-jsp","full_name":"execom-eu/execom-labs-team-pomodoro-jsp","owner":{"login":"execom-eu","id":5187957,"avatar_url":"https://avatars.githubusercontent.com/u/5187957?v=3","gravatar_id":"","url":"https://api.github.com/users/execom-eu","html_url":"https://github.com/execom-eu","followers_url":"https://api.github.com/users/execom-eu/followers","following_url":"https://api.github.com/users/execom-eu/following{/other_user}","gists_url":"https://api.github.com/users/execom-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/execom-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/execom-eu/subscriptions","organizations_url":"https://api.github.com/users/execom-eu/orgs","repos_url":"https://api.github.com/users/execom-eu/repos","events_url":"https://api.github.com/users/execom-eu/events{/privacy}","received_events_url":"https://api.github.com/users/execom-eu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp","description":"kontakt Stanislav Grujic","fork":false,"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp","forks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/forks","keys_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/teams","hooks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/hooks","issue_events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/events{/number}","events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/events","assignees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/assignees{/user}","branches_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/branches{/branch}","tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/tags","blobs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/refs{/sha}","trees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/statuses/{sha}","languages_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/languages","stargazers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/stargazers","contributors_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/contributors","subscribers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/subscribers","subscription_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/subscription","commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/commits{/sha}","git_commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/commits{/sha}","comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/comments{/number}","issue_comment_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/comments{/number}","contents_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/contents/{+path}","compare_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/merges","archive_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/downloads","issues_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues{/number}","pulls_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls{/number}","milestones_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/milestones{/number}","notifications_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/labels{/name}","releases_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/releases{/id}","deployments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/deployments","created_at":"2016-08-08T08:45:49Z","updated_at":"2016-08-11T06:54:47Z","pushed_at":"2016-08-11T08:20:26Z","git_url":"git://github.com/execom-eu/execom-labs-team-pomodoro-jsp.git","ssh_url":"git@github.com:execom-eu/execom-labs-team-pomodoro-jsp.git","clone_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp.git","svn_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp","homepage":null,"size":65,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"execom-eu:master","ref":"master","sha":"f14f2b282935e8c7e4bdef879efa499dae33d49e","user":{"login":"execom-eu","id":5187957,"avatar_url":"https://avatars.githubusercontent.com/u/5187957?v=3","gravatar_id":"","url":"https://api.github.com/users/execom-eu","html_url":"https://github.com/execom-eu","followers_url":"https://api.github.com/users/execom-eu/followers","following_url":"https://api.github.com/users/execom-eu/following{/other_user}","gists_url":"https://api.github.com/users/execom-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/execom-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/execom-eu/subscriptions","organizations_url":"https://api.github.com/users/execom-eu/orgs","repos_url":"https://api.github.com/users/execom-eu/repos","events_url":"https://api.github.com/users/execom-eu/events{/privacy}","received_events_url":"https://api.github.com/users/execom-eu/received_events","type":"Organization","site_admin":false},"repo":{"id":65188077,"name":"execom-labs-team-pomodoro-jsp","full_name":"execom-eu/execom-labs-team-pomodoro-jsp","owner":{"login":"execom-eu","id":5187957,"avatar_url":"https://avatars.githubusercontent.com/u/5187957?v=3","gravatar_id":"","url":"https://api.github.com/users/execom-eu","html_url":"https://github.com/execom-eu","followers_url":"https://api.github.com/users/execom-eu/followers","following_url":"https://api.github.com/users/execom-eu/following{/other_user}","gists_url":"https://api.github.com/users/execom-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/execom-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/execom-eu/subscriptions","organizations_url":"https://api.github.com/users/execom-eu/orgs","repos_url":"https://api.github.com/users/execom-eu/repos","events_url":"https://api.github.com/users/execom-eu/events{/privacy}","received_events_url":"https://api.github.com/users/execom-eu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp","description":"kontakt Stanislav Grujic","fork":false,"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp","forks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/forks","keys_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/teams","hooks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/hooks","issue_events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/events{/number}","events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/events","assignees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/assignees{/user}","branches_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/branches{/branch}","tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/tags","blobs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/refs{/sha}","trees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/statuses/{sha}","languages_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/languages","stargazers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/stargazers","contributors_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/contributors","subscribers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/subscribers","subscription_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/subscription","commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/commits{/sha}","git_commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/commits{/sha}","comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/comments{/number}","issue_comment_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/comments{/number}","contents_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/contents/{+path}","compare_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/merges","archive_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/downloads","issues_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues{/number}","pulls_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls{/number}","milestones_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/milestones{/number}","notifications_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/labels{/name}","releases_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/releases{/id}","deployments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/deployments","created_at":"2016-08-08T08:45:49Z","updated_at":"2016-08-11T06:54:47Z","pushed_at":"2016-08-11T08:20:26Z","git_url":"git://github.com/execom-eu/execom-labs-team-pomodoro-jsp.git","ssh_url":"git@github.com:execom-eu/execom-labs-team-pomodoro-jsp.git","clone_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp.git","svn_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp","homepage":null,"size":65,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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/execom-eu/execom-labs-team-pomodoro-jsp/pulls/4"},"html":{"href":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/4"},"issue":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/4"},"comments":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/statuses/1bf9886388784b346d29df31772125a5e106c5cd"}}}}
{"actor":{"display_login":"dufajlusi"}}