{"action":"created","comment":{"url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/comments/85660972","pull_request_review_id":6364720,"id":85660972,"diff_hunk":"@@ -0,0 +1,78 @@\n+package cz.muni.fi.pa165.team;\n+\n+import org.springframework.stereotype.Repository;\n+\n+import java.util.Collection;\n+import java.util.UUID;\n+import javax.persistence.EntityManager;\n+import javax.persistence.NoResultException;\n+import javax.persistence.PersistenceContext;\n+import javax.persistence.TypedQuery;\n+\n+/**\n+ *\n+ * @author Denis Galajda\n+ */\n+@Repository\n+public class TeamDaoImpl implements TeamDao\n+{\n+\n+    @PersistenceContext\n+    private EntityManager em;\n+\n+    @Override\n+    public Team findTeamByName(String name)\n+    {\n+        if (name == null || name.isEmpty()) {\n+            throw new IllegalArgumentException(\"Cannot search for null name\");\n+        }\n+\n+        try {\n+            return em\n+                .createQuery(\"SELECT t FROM Team t WHERE name = :name\", Team.class)\n+                .setParameter(\"name\", name)\n+                .getSingleResult();\n+\n+        } catch (NoResultException e) {\n+            return null;\n+        }\n+    }\n+\n+    @Override\n+    public Team findById(UUID id)\n+    {\n+        return em.find(Team.class, id);\n+    }\n+\n+    @Override\n+    public void setEntityManager(EntityManager em)","path":"soccer-records-model/src/main/java/cz/muni/fi/pa165/team/TeamDaoImpl.java","position":48,"original_position":48,"commit_id":"6d585fb9a9fcd60ed805de8e3e0955e8ca174a6b","original_commit_id":"6d585fb9a9fcd60ed805de8e3e0955e8ca174a6b","user":{"login":"fprochazka","id":158625,"avatar_url":"https://avatars.githubusercontent.com/u/158625?v=3","gravatar_id":"","url":"https://api.github.com/users/fprochazka","html_url":"https://github.com/fprochazka","followers_url":"https://api.github.com/users/fprochazka/followers","following_url":"https://api.github.com/users/fprochazka/following{/other_user}","gists_url":"https://api.github.com/users/fprochazka/gists{/gist_id}","starred_url":"https://api.github.com/users/fprochazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fprochazka/subscriptions","organizations_url":"https://api.github.com/users/fprochazka/orgs","repos_url":"https://api.github.com/users/fprochazka/repos","events_url":"https://api.github.com/users/fprochazka/events{/privacy}","received_events_url":"https://api.github.com/users/fprochazka/received_events","type":"User","site_admin":false},"body":"ta annotace `PersistenceContext` patří sem nad ten setter","created_at":"2016-10-30T14:29:53Z","updated_at":"2016-10-30T14:29:59Z","html_url":"https://github.com/fprochazka/fi-muni-PA165-project/pull/17#discussion_r85660972","pull_request_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/comments/85660972"},"html":{"href":"https://github.com/fprochazka/fi-muni-PA165-project/pull/17#discussion_r85660972"},"pull_request":{"href":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/17","id":91522997,"html_url":"https://github.com/fprochazka/fi-muni-PA165-project/pull/17","diff_url":"https://github.com/fprochazka/fi-muni-PA165-project/pull/17.diff","patch_url":"https://github.com/fprochazka/fi-muni-PA165-project/pull/17.patch","issue_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/issues/17","number":17,"state":"open","locked":false,"title":"Team","user":{"login":"ATP93","id":6797686,"avatar_url":"https://avatars.githubusercontent.com/u/6797686?v=3","gravatar_id":"","url":"https://api.github.com/users/ATP93","html_url":"https://github.com/ATP93","followers_url":"https://api.github.com/users/ATP93/followers","following_url":"https://api.github.com/users/ATP93/following{/other_user}","gists_url":"https://api.github.com/users/ATP93/gists{/gist_id}","starred_url":"https://api.github.com/users/ATP93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ATP93/subscriptions","organizations_url":"https://api.github.com/users/ATP93/orgs","repos_url":"https://api.github.com/users/ATP93/repos","events_url":"https://api.github.com/users/ATP93/events{/privacy}","received_events_url":"https://api.github.com/users/ATP93/received_events","type":"User","site_admin":false},"body":"vytvorena entita Team + Dao + DaoImpl","created_at":"2016-10-30T14:18:18Z","updated_at":"2016-10-30T14:29:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b645777a23da7faccfb8e590c76c7951b60efa6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/17/commits","review_comments_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/17/comments","review_comment_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/issues/17/comments","statuses_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/statuses/6d585fb9a9fcd60ed805de8e3e0955e8ca174a6b","head":{"label":"fprochazka:team","ref":"team","sha":"6d585fb9a9fcd60ed805de8e3e0955e8ca174a6b","user":{"login":"fprochazka","id":158625,"avatar_url":"https://avatars.githubusercontent.com/u/158625?v=3","gravatar_id":"","url":"https://api.github.com/users/fprochazka","html_url":"https://github.com/fprochazka","followers_url":"https://api.github.com/users/fprochazka/followers","following_url":"https://api.github.com/users/fprochazka/following{/other_user}","gists_url":"https://api.github.com/users/fprochazka/gists{/gist_id}","starred_url":"https://api.github.com/users/fprochazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fprochazka/subscriptions","organizations_url":"https://api.github.com/users/fprochazka/orgs","repos_url":"https://api.github.com/users/fprochazka/repos","events_url":"https://api.github.com/users/fprochazka/events{/privacy}","received_events_url":"https://api.github.com/users/fprochazka/received_events","type":"User","site_admin":false},"repo":{"id":70724149,"name":"fi-muni-PA165-project","full_name":"fprochazka/fi-muni-PA165-project","owner":{"login":"fprochazka","id":158625,"avatar_url":"https://avatars.githubusercontent.com/u/158625?v=3","gravatar_id":"","url":"https://api.github.com/users/fprochazka","html_url":"https://github.com/fprochazka","followers_url":"https://api.github.com/users/fprochazka/followers","following_url":"https://api.github.com/users/fprochazka/following{/other_user}","gists_url":"https://api.github.com/users/fprochazka/gists{/gist_id}","starred_url":"https://api.github.com/users/fprochazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fprochazka/subscriptions","organizations_url":"https://api.github.com/users/fprochazka/orgs","repos_url":"https://api.github.com/users/fprochazka/repos","events_url":"https://api.github.com/users/fprochazka/events{/privacy}","received_events_url":"https://api.github.com/users/fprochazka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fprochazka/fi-muni-PA165-project","description":null,"fork":false,"url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project","forks_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/forks","keys_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/teams","hooks_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/hooks","issue_events_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/issues/events{/number}","events_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/events","assignees_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/assignees{/user}","branches_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/branches{/branch}","tags_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/tags","blobs_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/statuses/{sha}","languages_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/languages","stargazers_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/stargazers","contributors_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/contributors","subscribers_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/subscribers","subscription_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/subscription","commits_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/contents/{+path}","compare_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/merges","archive_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/downloads","issues_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/issues{/number}","pulls_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls{/number}","milestones_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/milestones{/number}","notifications_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/labels{/name}","releases_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/releases{/id}","deployments_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/deployments","created_at":"2016-10-12T17:28:02Z","updated_at":"2016-10-26T16:46:19Z","pushed_at":"2016-10-30T14:29:22Z","git_url":"git://github.com/fprochazka/fi-muni-PA165-project.git","ssh_url":"git@github.com:fprochazka/fi-muni-PA165-project.git","clone_url":"https://github.com/fprochazka/fi-muni-PA165-project.git","svn_url":"https://github.com/fprochazka/fi-muni-PA165-project","homepage":null,"size":1047,"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":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"fprochazka:master","ref":"master","sha":"929ff5bde870b4f1495e7e4d8df4c387a589eb4b","user":{"login":"fprochazka","id":158625,"avatar_url":"https://avatars.githubusercontent.com/u/158625?v=3","gravatar_id":"","url":"https://api.github.com/users/fprochazka","html_url":"https://github.com/fprochazka","followers_url":"https://api.github.com/users/fprochazka/followers","following_url":"https://api.github.com/users/fprochazka/following{/other_user}","gists_url":"https://api.github.com/users/fprochazka/gists{/gist_id}","starred_url":"https://api.github.com/users/fprochazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fprochazka/subscriptions","organizations_url":"https://api.github.com/users/fprochazka/orgs","repos_url":"https://api.github.com/users/fprochazka/repos","events_url":"https://api.github.com/users/fprochazka/events{/privacy}","received_events_url":"https://api.github.com/users/fprochazka/received_events","type":"User","site_admin":false},"repo":{"id":70724149,"name":"fi-muni-PA165-project","full_name":"fprochazka/fi-muni-PA165-project","owner":{"login":"fprochazka","id":158625,"avatar_url":"https://avatars.githubusercontent.com/u/158625?v=3","gravatar_id":"","url":"https://api.github.com/users/fprochazka","html_url":"https://github.com/fprochazka","followers_url":"https://api.github.com/users/fprochazka/followers","following_url":"https://api.github.com/users/fprochazka/following{/other_user}","gists_url":"https://api.github.com/users/fprochazka/gists{/gist_id}","starred_url":"https://api.github.com/users/fprochazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fprochazka/subscriptions","organizations_url":"https://api.github.com/users/fprochazka/orgs","repos_url":"https://api.github.com/users/fprochazka/repos","events_url":"https://api.github.com/users/fprochazka/events{/privacy}","received_events_url":"https://api.github.com/users/fprochazka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fprochazka/fi-muni-PA165-project","description":null,"fork":false,"url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project","forks_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/forks","keys_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/teams","hooks_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/hooks","issue_events_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/issues/events{/number}","events_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/events","assignees_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/assignees{/user}","branches_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/branches{/branch}","tags_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/tags","blobs_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/statuses/{sha}","languages_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/languages","stargazers_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/stargazers","contributors_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/contributors","subscribers_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/subscribers","subscription_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/subscription","commits_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/contents/{+path}","compare_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/merges","archive_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/downloads","issues_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/issues{/number}","pulls_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls{/number}","milestones_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/milestones{/number}","notifications_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/labels{/name}","releases_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/releases{/id}","deployments_url":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/deployments","created_at":"2016-10-12T17:28:02Z","updated_at":"2016-10-26T16:46:19Z","pushed_at":"2016-10-30T14:29:22Z","git_url":"git://github.com/fprochazka/fi-muni-PA165-project.git","ssh_url":"git@github.com:fprochazka/fi-muni-PA165-project.git","clone_url":"https://github.com/fprochazka/fi-muni-PA165-project.git","svn_url":"https://github.com/fprochazka/fi-muni-PA165-project","homepage":null,"size":1047,"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":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/17"},"html":{"href":"https://github.com/fprochazka/fi-muni-PA165-project/pull/17"},"issue":{"href":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/issues/17"},"comments":{"href":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/fprochazka/fi-muni-PA165-project/statuses/6d585fb9a9fcd60ed805de8e3e0955e8ca174a6b"}}}}
{"actor":{"display_login":"fprochazka"}}