{"action":"created","comment":{"url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/comments/86105947","pull_request_review_id":6779949,"id":86105947,"diff_hunk":"@@ -0,0 +1,58 @@\n+package ru.mail.park.DAO2;\n+\n+import java.util.List;\n+\n+import javax.persistence.EntityManager;\n+import javax.persistence.PersistenceContext;\n+\n+import org.springframework.stereotype.Repository;\n+\n+import ru.mail.park.model.UserProfile;\n+\n+@Repository\n+public class UserProfileImpl implements UserProfileDAO {\n+\n+  @PersistenceContext\n+  private EntityManager entityManager;\n+\n+  public UserProfile getUserById(Integer id) {\n+    return entityManager.find(UserProfile.class, id);\n+  }\n+\n+  public Integer addNewUser(String login, String name, String password, String email) {\n+    UserProfile user = new UserProfile(login, name, email, password);\n+    entityManager.persist(user);\n+    return user.getId();\n+  }\n+\n+  public UserProfile existingUserByLogin(String login) {\n+\n+    return entityManager\n+        .createQuery(\"select u from UserProfile u\"\n+            + \" where u.login=:login\", UserProfile.class)\n+        .setParameter(\"login\", login)\n+        .getSingleResult();\n+\n+  }\n+\n+  public List<UserProfile> getAllUsers() {\n+\n+    // TODO надо как-то ограничить результат и никогда не доставать всех","path":"src/main/java/ru/mail/park/DAO2/UserProfileImpl.java","position":null,"original_position":40,"commit_id":"27be1f21bbcc43b14528413bd863a6e6b566fe83","original_commit_id":"e20961eda784dc6a59aff8250fe1e94c6786eb43","user":{"login":"sergey90x","id":16411063,"avatar_url":"https://avatars.githubusercontent.com/u/16411063?v=3","gravatar_id":"","url":"https://api.github.com/users/sergey90x","html_url":"https://github.com/sergey90x","followers_url":"https://api.github.com/users/sergey90x/followers","following_url":"https://api.github.com/users/sergey90x/following{/other_user}","gists_url":"https://api.github.com/users/sergey90x/gists{/gist_id}","starred_url":"https://api.github.com/users/sergey90x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergey90x/subscriptions","organizations_url":"https://api.github.com/users/sergey90x/orgs","repos_url":"https://api.github.com/users/sergey90x/repos","events_url":"https://api.github.com/users/sergey90x/events{/privacy}","received_events_url":"https://api.github.com/users/sergey90x/received_events","type":"User","site_admin":false},"body":"Да, надо сделать, я просто начал делать API не задумываясь о все деталях и не согласовал с фронтом какие поля нужны и оказалось, что нет поля по которому нужно топ сделать, пока что просто вывожу первых 50 юзеров, но сейчас буду исправлять.\r\n","created_at":"2016-11-02T09:57:48Z","updated_at":"2016-11-02T09:57:48Z","html_url":"https://github.com/java-park-mail-ru/osmos-09-2016/pull/3#discussion_r86105947","pull_request_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/comments/86105947"},"html":{"href":"https://github.com/java-park-mail-ru/osmos-09-2016/pull/3#discussion_r86105947"},"pull_request":{"href":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/3","id":91241070,"html_url":"https://github.com/java-park-mail-ru/osmos-09-2016/pull/3","diff_url":"https://github.com/java-park-mail-ru/osmos-09-2016/pull/3.diff","patch_url":"https://github.com/java-park-mail-ru/osmos-09-2016/pull/3.patch","issue_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/issues/3","number":3,"state":"open","locked":false,"title":"РК2","user":{"login":"sergey90x","id":16411063,"avatar_url":"https://avatars.githubusercontent.com/u/16411063?v=3","gravatar_id":"","url":"https://api.github.com/users/sergey90x","html_url":"https://github.com/sergey90x","followers_url":"https://api.github.com/users/sergey90x/followers","following_url":"https://api.github.com/users/sergey90x/following{/other_user}","gists_url":"https://api.github.com/users/sergey90x/gists{/gist_id}","starred_url":"https://api.github.com/users/sergey90x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergey90x/subscriptions","organizations_url":"https://api.github.com/users/sergey90x/orgs","repos_url":"https://api.github.com/users/sergey90x/repos","events_url":"https://api.github.com/users/sergey90x/events{/privacy}","received_events_url":"https://api.github.com/users/sergey90x/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-27T16:58:04Z","updated_at":"2016-11-02T09:57:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f341b4dba00442cf0b28f6917e65cdef1c7b019","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/3/commits","review_comments_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/3/comments","review_comment_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/comments{/number}","comments_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/issues/3/comments","statuses_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/statuses/27be1f21bbcc43b14528413bd863a6e6b566fe83","head":{"label":"sergey90x:master","ref":"master","sha":"27be1f21bbcc43b14528413bd863a6e6b566fe83","user":{"login":"sergey90x","id":16411063,"avatar_url":"https://avatars.githubusercontent.com/u/16411063?v=3","gravatar_id":"","url":"https://api.github.com/users/sergey90x","html_url":"https://github.com/sergey90x","followers_url":"https://api.github.com/users/sergey90x/followers","following_url":"https://api.github.com/users/sergey90x/following{/other_user}","gists_url":"https://api.github.com/users/sergey90x/gists{/gist_id}","starred_url":"https://api.github.com/users/sergey90x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergey90x/subscriptions","organizations_url":"https://api.github.com/users/sergey90x/orgs","repos_url":"https://api.github.com/users/sergey90x/repos","events_url":"https://api.github.com/users/sergey90x/events{/privacy}","received_events_url":"https://api.github.com/users/sergey90x/received_events","type":"User","site_admin":false},"repo":{"id":68220887,"name":"osmos-09-2016","full_name":"sergey90x/osmos-09-2016","owner":{"login":"sergey90x","id":16411063,"avatar_url":"https://avatars.githubusercontent.com/u/16411063?v=3","gravatar_id":"","url":"https://api.github.com/users/sergey90x","html_url":"https://github.com/sergey90x","followers_url":"https://api.github.com/users/sergey90x/followers","following_url":"https://api.github.com/users/sergey90x/following{/other_user}","gists_url":"https://api.github.com/users/sergey90x/gists{/gist_id}","starred_url":"https://api.github.com/users/sergey90x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergey90x/subscriptions","organizations_url":"https://api.github.com/users/sergey90x/orgs","repos_url":"https://api.github.com/users/sergey90x/repos","events_url":"https://api.github.com/users/sergey90x/events{/privacy}","received_events_url":"https://api.github.com/users/sergey90x/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sergey90x/osmos-09-2016","description":null,"fork":true,"url":"https://api.github.com/repos/sergey90x/osmos-09-2016","forks_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/forks","keys_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/teams","hooks_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/hooks","issue_events_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/issues/events{/number}","events_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/events","assignees_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/assignees{/user}","branches_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/branches{/branch}","tags_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/tags","blobs_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/statuses/{sha}","languages_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/languages","stargazers_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/stargazers","contributors_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/contributors","subscribers_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/subscribers","subscription_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/subscription","commits_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/contents/{+path}","compare_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/merges","archive_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/downloads","issues_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/issues{/number}","pulls_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/pulls{/number}","milestones_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/milestones{/number}","notifications_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/labels{/name}","releases_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/releases{/id}","deployments_url":"https://api.github.com/repos/sergey90x/osmos-09-2016/deployments","created_at":"2016-09-14T15:59:59Z","updated_at":"2016-10-05T12:10:09Z","pushed_at":"2016-11-02T09:31:51Z","git_url":"git://github.com/sergey90x/osmos-09-2016.git","ssh_url":"git@github.com:sergey90x/osmos-09-2016.git","clone_url":"https://github.com/sergey90x/osmos-09-2016.git","svn_url":"https://github.com/sergey90x/osmos-09-2016","homepage":null,"size":12556,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"java-park-mail-ru:master","ref":"master","sha":"2048f39db51ea328be771f95efe4f9d6fce3a4e7","user":{"login":"java-park-mail-ru","id":17194939,"avatar_url":"https://avatars.githubusercontent.com/u/17194939?v=3","gravatar_id":"","url":"https://api.github.com/users/java-park-mail-ru","html_url":"https://github.com/java-park-mail-ru","followers_url":"https://api.github.com/users/java-park-mail-ru/followers","following_url":"https://api.github.com/users/java-park-mail-ru/following{/other_user}","gists_url":"https://api.github.com/users/java-park-mail-ru/gists{/gist_id}","starred_url":"https://api.github.com/users/java-park-mail-ru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/java-park-mail-ru/subscriptions","organizations_url":"https://api.github.com/users/java-park-mail-ru/orgs","repos_url":"https://api.github.com/users/java-park-mail-ru/repos","events_url":"https://api.github.com/users/java-park-mail-ru/events{/privacy}","received_events_url":"https://api.github.com/users/java-park-mail-ru/received_events","type":"Organization","site_admin":false},"repo":{"id":67642174,"name":"osmos-09-2016","full_name":"java-park-mail-ru/osmos-09-2016","owner":{"login":"java-park-mail-ru","id":17194939,"avatar_url":"https://avatars.githubusercontent.com/u/17194939?v=3","gravatar_id":"","url":"https://api.github.com/users/java-park-mail-ru","html_url":"https://github.com/java-park-mail-ru","followers_url":"https://api.github.com/users/java-park-mail-ru/followers","following_url":"https://api.github.com/users/java-park-mail-ru/following{/other_user}","gists_url":"https://api.github.com/users/java-park-mail-ru/gists{/gist_id}","starred_url":"https://api.github.com/users/java-park-mail-ru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/java-park-mail-ru/subscriptions","organizations_url":"https://api.github.com/users/java-park-mail-ru/orgs","repos_url":"https://api.github.com/users/java-park-mail-ru/repos","events_url":"https://api.github.com/users/java-park-mail-ru/events{/privacy}","received_events_url":"https://api.github.com/users/java-park-mail-ru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/java-park-mail-ru/osmos-09-2016","description":null,"fork":false,"url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016","forks_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/forks","keys_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/teams","hooks_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/hooks","issue_events_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/issues/events{/number}","events_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/events","assignees_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/assignees{/user}","branches_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/branches{/branch}","tags_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/tags","blobs_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/statuses/{sha}","languages_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/languages","stargazers_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/stargazers","contributors_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/contributors","subscribers_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/subscribers","subscription_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/subscription","commits_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/contents/{+path}","compare_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/merges","archive_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/downloads","issues_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/issues{/number}","pulls_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls{/number}","milestones_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/milestones{/number}","notifications_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/labels{/name}","releases_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/releases{/id}","deployments_url":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/deployments","created_at":"2016-09-07T20:44:55Z","updated_at":"2016-10-20T16:38:26Z","pushed_at":"2016-11-02T09:31:52Z","git_url":"git://github.com/java-park-mail-ru/osmos-09-2016.git","ssh_url":"git@github.com:java-park-mail-ru/osmos-09-2016.git","clone_url":"https://github.com/java-park-mail-ru/osmos-09-2016.git","svn_url":"https://github.com/java-park-mail-ru/osmos-09-2016","homepage":null,"size":12465,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/3"},"html":{"href":"https://github.com/java-park-mail-ru/osmos-09-2016/pull/3"},"issue":{"href":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/issues/3"},"comments":{"href":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/java-park-mail-ru/osmos-09-2016/statuses/27be1f21bbcc43b14528413bd863a6e6b566fe83"}}}}
{"actor":{"display_login":"sergey90x"}}