{"action":"created","comment":{"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/comments/86987972","pull_request_review_id":7615923,"id":86987972,"diff_hunk":"@@ -25,4 +28,28 @@ public boolean isUniqueTeamName(String name) {\n         long result = (Long) q.getSingleResult();\n         return result == 0;\n     }\n+\n+    @Override\n+    public List<Team> getTeams(int startPosition, int maxResult, long userId) {\n+        TypedQuery<Team> q = em.createQuery(\"select team from UserTeam ut where ut.user.userId like:userId \",\n+                Team.class);\n+        q.setParameter(\"userId\", userId);\n+        q.setFirstResult(startPosition);\n+        q.setMaxResults(maxResult);\n+        List<Team> teams = q.getResultList();\n+        return teams;\n+    }\n+\n+    @Override\n+    public long getNumberOfTeams() {\n+        Query q = em.createQuery(\"select count(*) from Team\");\n+        return (Long) q.getSingleResult();\n+    }\n+\n+    @Override\n+    public long getNumberOfTeamsByUser(long userId) {\n+        Query q = em.createQuery(\"select count(*) from UserTeam ut where ut.user.userId like:userId \");","path":"src/main/java/eu/execom/labs/pomodoro/session/TeamDaoImpl.java","position":36,"original_position":36,"commit_id":"ef198f94ebcfce6fa4260ae0618f7c7baa3f97b5","original_commit_id":"ef198f94ebcfce6fa4260ae0618f7c7baa3f97b5","user":{"login":"stanislavgrujic","id":2743162,"avatar_url":"https://avatars.githubusercontent.com/u/2743162?v=3","gravatar_id":"","url":"https://api.github.com/users/stanislavgrujic","html_url":"https://github.com/stanislavgrujic","followers_url":"https://api.github.com/users/stanislavgrujic/followers","following_url":"https://api.github.com/users/stanislavgrujic/following{/other_user}","gists_url":"https://api.github.com/users/stanislavgrujic/gists{/gist_id}","starred_url":"https://api.github.com/users/stanislavgrujic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanislavgrujic/subscriptions","organizations_url":"https://api.github.com/users/stanislavgrujic/orgs","repos_url":"https://api.github.com/users/stanislavgrujic/repos","events_url":"https://api.github.com/users/stanislavgrujic/events{/privacy}","received_events_url":"https://api.github.com/users/stanislavgrujic/received_events","type":"User","site_admin":false},"body":"Does this work at all? You are missing space after the 'like' operation. Also, you should use '=' for equality comparison, since the 'like' is more expensive.","created_at":"2016-11-08T13:33:11Z","updated_at":"2016-11-08T13:53:11Z","html_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pull/7#discussion_r86987972","pull_request_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/comments/86987972"},"html":{"href":"https://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pull/7#discussion_r86987972"},"pull_request":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/7","id":92769637,"html_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pull/7","diff_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pull/7.diff","patch_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pull/7.patch","issue_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/issues/7","number":7,"state":"open","locked":false,"title":"Develop remove user from team","user":{"login":"srdjanns","id":16257489,"avatar_url":"https://avatars.githubusercontent.com/u/16257489?v=3","gravatar_id":"","url":"https://api.github.com/users/srdjanns","html_url":"https://github.com/srdjanns","followers_url":"https://api.github.com/users/srdjanns/followers","following_url":"https://api.github.com/users/srdjanns/following{/other_user}","gists_url":"https://api.github.com/users/srdjanns/gists{/gist_id}","starred_url":"https://api.github.com/users/srdjanns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srdjanns/subscriptions","organizations_url":"https://api.github.com/users/srdjanns/orgs","repos_url":"https://api.github.com/users/srdjanns/repos","events_url":"https://api.github.com/users/srdjanns/events{/privacy}","received_events_url":"https://api.github.com/users/srdjanns/received_events","type":"User","site_admin":false},"body":"Hello,\r\nwe are sorry for this large pull request, we had troubles with git because of our previous branches so we had to combine all our work into one branch.","created_at":"2016-11-08T12:35:05Z","updated_at":"2016-11-08T13:53:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af5391a91f1bf8e526f37ab76bbb63323d141c9a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/7/commits","review_comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/7/comments","review_comment_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/issues/7/comments","statuses_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/statuses/ef198f94ebcfce6fa4260ae0618f7c7baa3f97b5","head":{"label":"execom-eu:develop-removeUserFromTeam","ref":"develop-removeUserFromTeam","sha":"ef198f94ebcfce6fa4260ae0618f7c7baa3f97b5","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":71871119,"name":"execom-labs-team-pomodoro-ejb-jsf","full_name":"execom-eu/execom-labs-team-pomodoro-ejb-jsf","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-ejb-jsf","description":"Implementation of Team Pomodoro project using Java 1.6, EJB and JSF.","fork":false,"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf","forks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/forks","keys_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/teams","hooks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/hooks","issue_events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/issues/events{/number}","events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/events","assignees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/assignees{/user}","branches_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/branches{/branch}","tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/tags","blobs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/git/refs{/sha}","trees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/statuses/{sha}","languages_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/languages","stargazers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/stargazers","contributors_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/contributors","subscribers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/subscribers","subscription_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/subscription","commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/commits{/sha}","git_commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/git/commits{/sha}","comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/comments{/number}","issue_comment_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/issues/comments{/number}","contents_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/contents/{+path}","compare_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/merges","archive_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/downloads","issues_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/issues{/number}","pulls_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls{/number}","milestones_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/milestones{/number}","notifications_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/labels{/name}","releases_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/releases{/id}","deployments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/deployments","created_at":"2016-10-25T07:32:17Z","updated_at":"2016-11-02T08:54:59Z","pushed_at":"2016-11-08T12:35:05Z","git_url":"git://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf.git","ssh_url":"git@github.com:execom-eu/execom-labs-team-pomodoro-ejb-jsf.git","clone_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf.git","svn_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf","homepage":null,"size":119,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"execom-eu:master","ref":"master","sha":"de9fed657c188f3937901e1fdd713de4bacaa8ee","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":71871119,"name":"execom-labs-team-pomodoro-ejb-jsf","full_name":"execom-eu/execom-labs-team-pomodoro-ejb-jsf","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-ejb-jsf","description":"Implementation of Team Pomodoro project using Java 1.6, EJB and JSF.","fork":false,"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf","forks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/forks","keys_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/teams","hooks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/hooks","issue_events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/issues/events{/number}","events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/events","assignees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/assignees{/user}","branches_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/branches{/branch}","tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/tags","blobs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/git/refs{/sha}","trees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/statuses/{sha}","languages_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/languages","stargazers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/stargazers","contributors_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/contributors","subscribers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/subscribers","subscription_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/subscription","commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/commits{/sha}","git_commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/git/commits{/sha}","comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/comments{/number}","issue_comment_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/issues/comments{/number}","contents_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/contents/{+path}","compare_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/merges","archive_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/downloads","issues_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/issues{/number}","pulls_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls{/number}","milestones_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/milestones{/number}","notifications_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/labels{/name}","releases_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/releases{/id}","deployments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/deployments","created_at":"2016-10-25T07:32:17Z","updated_at":"2016-11-02T08:54:59Z","pushed_at":"2016-11-08T12:35:05Z","git_url":"git://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf.git","ssh_url":"git@github.com:execom-eu/execom-labs-team-pomodoro-ejb-jsf.git","clone_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf.git","svn_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf","homepage":null,"size":119,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/7"},"html":{"href":"https://github.com/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pull/7"},"issue":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/issues/7"},"comments":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-ejb-jsf/statuses/ef198f94ebcfce6fa4260ae0618f7c7baa3f97b5"}}}}
{"actor":{"display_login":"stanislavgrujic"}}