{"action":"created","comment":{"url":"https://api.github.com/repos/PaymentSystem/Application/pulls/comments/227940009","pull_request_review_id":168092994,"id":227940009,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzk0MDAwOQ==","diff_hunk":"@@ -0,0 +1,137 @@\n+\n+package com.epam.lab.paymentsystem.utility;\n+\n+import com.epam.lab.paymentsystem.dao.ConnectionPool;\n+import javax.naming.NamingException;\n+import java.sql.Connection;\n+import java.sql.PreparedStatement;\n+import java.sql.ResultSet;\n+import java.sql.SQLException;\n+import java.util.LinkedList;\n+import java.util.List;\n+\n+class AddTestData {\n+\n+    public static Connection connection;\n+\n+    private final static List<String> USERS = new LinkedList<>();\n+    private final static List<String> ACCOUNT = new LinkedList<>();\n+    private final static List<Boolean> CARDS = new LinkedList<>();\n+    private final static String SQL_USERS = \"INSERT INTO users (login, passwd, id_role, user_name)\" + \" VALUES (?,?,?,?)\";\n+    private final static String SQL_ACCOUNTS = \"INSERT INTO accounts (id_user, amount, is_active)\" + \" VALUES (?,?,?)\";\n+    private final static String SQL_CARDS = \"INSERT INTO cards (id_user, id_account, is_active)\" + \" VALUES (?,?,?)\";\n+    private final static String SQL_ID_USER = \"SELECT * FROM USERS WHERE login = ?\";\n+    private final static String SQL_ID_ACCOUNT = \"SELECT * FROM ACCOUNTS WHERE id_user = ?\";\n+    private final static String SQL_ID_ROLE_USER = \"SELECT * FROM USERS WHERE id_role = ?\";\n+\n+    private static final int DATA_COUNT = 5;\n+\n+    private static void createData() {\n+        USERS.add(\"zorita,1234,1,Zoy\");","path":"src/main/java/com/epam/lab/paymentsystem/utility/AddTestData.java","position":30,"original_position":30,"commit_id":"c129d4ad05e4aa627c11312c2f636ee72ba3ba91","original_commit_id":"c129d4ad05e4aa627c11312c2f636ee72ba3ba91","user":{"login":"Meisssshu","id":43749789,"node_id":"MDQ6VXNlcjQzNzQ5Nzg5","avatar_url":"https://avatars2.githubusercontent.com/u/43749789?v=4","gravatar_id":"","url":"https://api.github.com/users/Meisssshu","html_url":"https://github.com/Meisssshu","followers_url":"https://api.github.com/users/Meisssshu/followers","following_url":"https://api.github.com/users/Meisssshu/following{/other_user}","gists_url":"https://api.github.com/users/Meisssshu/gists{/gist_id}","starred_url":"https://api.github.com/users/Meisssshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Meisssshu/subscriptions","organizations_url":"https://api.github.com/users/Meisssshu/orgs","repos_url":"https://api.github.com/users/Meisssshu/repos","events_url":"https://api.github.com/users/Meisssshu/events{/privacy}","received_events_url":"https://api.github.com/users/Meisssshu/received_events","type":"User","site_admin":false},"body":"You may use smth like that (for better redability):\r\n```\r\nUsers.addAll(\r\n       Collections.asList(\r\n                          \"zorita,1234,1,Zoy\",\r\n                          \"chaim,qwer,2,Chester\",\r\n                          ...\r\n                          )\r\n);\r\n```","created_at":"2018-10-24T20:03:09Z","updated_at":"2018-10-24T20:10:05Z","html_url":"https://github.com/PaymentSystem/Application/pull/21#discussion_r227940009","pull_request_url":"https://api.github.com/repos/PaymentSystem/Application/pulls/21","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/PaymentSystem/Application/pulls/comments/227940009"},"html":{"href":"https://github.com/PaymentSystem/Application/pull/21#discussion_r227940009"},"pull_request":{"href":"https://api.github.com/repos/PaymentSystem/Application/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/PaymentSystem/Application/pulls/21","id":225510809,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NTEwODA5","html_url":"https://github.com/PaymentSystem/Application/pull/21","diff_url":"https://github.com/PaymentSystem/Application/pull/21.diff","patch_url":"https://github.com/PaymentSystem/Application/pull/21.patch","issue_url":"https://api.github.com/repos/PaymentSystem/Application/issues/21","number":21,"state":"open","locked":false,"title":"Utility","user":{"login":"Fleaman777","id":34376556,"node_id":"MDQ6VXNlcjM0Mzc2NTU2","avatar_url":"https://avatars3.githubusercontent.com/u/34376556?v=4","gravatar_id":"","url":"https://api.github.com/users/Fleaman777","html_url":"https://github.com/Fleaman777","followers_url":"https://api.github.com/users/Fleaman777/followers","following_url":"https://api.github.com/users/Fleaman777/following{/other_user}","gists_url":"https://api.github.com/users/Fleaman777/gists{/gist_id}","starred_url":"https://api.github.com/users/Fleaman777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fleaman777/subscriptions","organizations_url":"https://api.github.com/users/Fleaman777/orgs","repos_url":"https://api.github.com/users/Fleaman777/repos","events_url":"https://api.github.com/users/Fleaman777/events{/privacy}","received_events_url":"https://api.github.com/users/Fleaman777/received_events","type":"User","site_admin":false},"body":"New class: add test data in the data base.","created_at":"2018-10-24T18:47:17Z","updated_at":"2018-10-24T20:10:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd2d5df4268758ee56465004b805b3a6fe68666a","assignee":{"login":"nikandtos","id":24877050,"node_id":"MDQ6VXNlcjI0ODc3MDUw","avatar_url":"https://avatars2.githubusercontent.com/u/24877050?v=4","gravatar_id":"","url":"https://api.github.com/users/nikandtos","html_url":"https://github.com/nikandtos","followers_url":"https://api.github.com/users/nikandtos/followers","following_url":"https://api.github.com/users/nikandtos/following{/other_user}","gists_url":"https://api.github.com/users/nikandtos/gists{/gist_id}","starred_url":"https://api.github.com/users/nikandtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikandtos/subscriptions","organizations_url":"https://api.github.com/users/nikandtos/orgs","repos_url":"https://api.github.com/users/nikandtos/repos","events_url":"https://api.github.com/users/nikandtos/events{/privacy}","received_events_url":"https://api.github.com/users/nikandtos/received_events","type":"User","site_admin":false},"assignees":[{"login":"nikandtos","id":24877050,"node_id":"MDQ6VXNlcjI0ODc3MDUw","avatar_url":"https://avatars2.githubusercontent.com/u/24877050?v=4","gravatar_id":"","url":"https://api.github.com/users/nikandtos","html_url":"https://github.com/nikandtos","followers_url":"https://api.github.com/users/nikandtos/followers","following_url":"https://api.github.com/users/nikandtos/following{/other_user}","gists_url":"https://api.github.com/users/nikandtos/gists{/gist_id}","starred_url":"https://api.github.com/users/nikandtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikandtos/subscriptions","organizations_url":"https://api.github.com/users/nikandtos/orgs","repos_url":"https://api.github.com/users/nikandtos/repos","events_url":"https://api.github.com/users/nikandtos/events{/privacy}","received_events_url":"https://api.github.com/users/nikandtos/received_events","type":"User","site_admin":false},{"login":"Meisssshu","id":43749789,"node_id":"MDQ6VXNlcjQzNzQ5Nzg5","avatar_url":"https://avatars2.githubusercontent.com/u/43749789?v=4","gravatar_id":"","url":"https://api.github.com/users/Meisssshu","html_url":"https://github.com/Meisssshu","followers_url":"https://api.github.com/users/Meisssshu/followers","following_url":"https://api.github.com/users/Meisssshu/following{/other_user}","gists_url":"https://api.github.com/users/Meisssshu/gists{/gist_id}","starred_url":"https://api.github.com/users/Meisssshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Meisssshu/subscriptions","organizations_url":"https://api.github.com/users/Meisssshu/orgs","repos_url":"https://api.github.com/users/Meisssshu/repos","events_url":"https://api.github.com/users/Meisssshu/events{/privacy}","received_events_url":"https://api.github.com/users/Meisssshu/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PaymentSystem/Application/pulls/21/commits","review_comments_url":"https://api.github.com/repos/PaymentSystem/Application/pulls/21/comments","review_comment_url":"https://api.github.com/repos/PaymentSystem/Application/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PaymentSystem/Application/issues/21/comments","statuses_url":"https://api.github.com/repos/PaymentSystem/Application/statuses/c129d4ad05e4aa627c11312c2f636ee72ba3ba91","head":{"label":"PaymentSystem:utility","ref":"utility","sha":"c129d4ad05e4aa627c11312c2f636ee72ba3ba91","user":{"login":"PaymentSystem","id":43988417,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzOTg4NDE3","avatar_url":"https://avatars3.githubusercontent.com/u/43988417?v=4","gravatar_id":"","url":"https://api.github.com/users/PaymentSystem","html_url":"https://github.com/PaymentSystem","followers_url":"https://api.github.com/users/PaymentSystem/followers","following_url":"https://api.github.com/users/PaymentSystem/following{/other_user}","gists_url":"https://api.github.com/users/PaymentSystem/gists{/gist_id}","starred_url":"https://api.github.com/users/PaymentSystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaymentSystem/subscriptions","organizations_url":"https://api.github.com/users/PaymentSystem/orgs","repos_url":"https://api.github.com/users/PaymentSystem/repos","events_url":"https://api.github.com/users/PaymentSystem/events{/privacy}","received_events_url":"https://api.github.com/users/PaymentSystem/received_events","type":"Organization","site_admin":false},"repo":{"id":152229255,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIyMjkyNTU=","name":"Application","full_name":"PaymentSystem/Application","private":false,"owner":{"login":"PaymentSystem","id":43988417,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzOTg4NDE3","avatar_url":"https://avatars3.githubusercontent.com/u/43988417?v=4","gravatar_id":"","url":"https://api.github.com/users/PaymentSystem","html_url":"https://github.com/PaymentSystem","followers_url":"https://api.github.com/users/PaymentSystem/followers","following_url":"https://api.github.com/users/PaymentSystem/following{/other_user}","gists_url":"https://api.github.com/users/PaymentSystem/gists{/gist_id}","starred_url":"https://api.github.com/users/PaymentSystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaymentSystem/subscriptions","organizations_url":"https://api.github.com/users/PaymentSystem/orgs","repos_url":"https://api.github.com/users/PaymentSystem/repos","events_url":"https://api.github.com/users/PaymentSystem/events{/privacy}","received_events_url":"https://api.github.com/users/PaymentSystem/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PaymentSystem/Application","description":null,"fork":false,"url":"https://api.github.com/repos/PaymentSystem/Application","forks_url":"https://api.github.com/repos/PaymentSystem/Application/forks","keys_url":"https://api.github.com/repos/PaymentSystem/Application/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PaymentSystem/Application/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PaymentSystem/Application/teams","hooks_url":"https://api.github.com/repos/PaymentSystem/Application/hooks","issue_events_url":"https://api.github.com/repos/PaymentSystem/Application/issues/events{/number}","events_url":"https://api.github.com/repos/PaymentSystem/Application/events","assignees_url":"https://api.github.com/repos/PaymentSystem/Application/assignees{/user}","branches_url":"https://api.github.com/repos/PaymentSystem/Application/branches{/branch}","tags_url":"https://api.github.com/repos/PaymentSystem/Application/tags","blobs_url":"https://api.github.com/repos/PaymentSystem/Application/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PaymentSystem/Application/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PaymentSystem/Application/git/refs{/sha}","trees_url":"https://api.github.com/repos/PaymentSystem/Application/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PaymentSystem/Application/statuses/{sha}","languages_url":"https://api.github.com/repos/PaymentSystem/Application/languages","stargazers_url":"https://api.github.com/repos/PaymentSystem/Application/stargazers","contributors_url":"https://api.github.com/repos/PaymentSystem/Application/contributors","subscribers_url":"https://api.github.com/repos/PaymentSystem/Application/subscribers","subscription_url":"https://api.github.com/repos/PaymentSystem/Application/subscription","commits_url":"https://api.github.com/repos/PaymentSystem/Application/commits{/sha}","git_commits_url":"https://api.github.com/repos/PaymentSystem/Application/git/commits{/sha}","comments_url":"https://api.github.com/repos/PaymentSystem/Application/comments{/number}","issue_comment_url":"https://api.github.com/repos/PaymentSystem/Application/issues/comments{/number}","contents_url":"https://api.github.com/repos/PaymentSystem/Application/contents/{+path}","compare_url":"https://api.github.com/repos/PaymentSystem/Application/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PaymentSystem/Application/merges","archive_url":"https://api.github.com/repos/PaymentSystem/Application/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PaymentSystem/Application/downloads","issues_url":"https://api.github.com/repos/PaymentSystem/Application/issues{/number}","pulls_url":"https://api.github.com/repos/PaymentSystem/Application/pulls{/number}","milestones_url":"https://api.github.com/repos/PaymentSystem/Application/milestones{/number}","notifications_url":"https://api.github.com/repos/PaymentSystem/Application/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PaymentSystem/Application/labels{/name}","releases_url":"https://api.github.com/repos/PaymentSystem/Application/releases{/id}","deployments_url":"https://api.github.com/repos/PaymentSystem/Application/deployments","created_at":"2018-10-09T10:04:07Z","updated_at":"2018-10-23T09:18:50Z","pushed_at":"2018-10-24T18:47:18Z","git_url":"git://github.com/PaymentSystem/Application.git","ssh_url":"git@github.com:PaymentSystem/Application.git","clone_url":"https://github.com/PaymentSystem/Application.git","svn_url":"https://github.com/PaymentSystem/Application","homepage":null,"size":102,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"PaymentSystem:dev","ref":"dev","sha":"8a1358382bace1dc875d7aa85e41a33fa18c88ce","user":{"login":"PaymentSystem","id":43988417,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzOTg4NDE3","avatar_url":"https://avatars3.githubusercontent.com/u/43988417?v=4","gravatar_id":"","url":"https://api.github.com/users/PaymentSystem","html_url":"https://github.com/PaymentSystem","followers_url":"https://api.github.com/users/PaymentSystem/followers","following_url":"https://api.github.com/users/PaymentSystem/following{/other_user}","gists_url":"https://api.github.com/users/PaymentSystem/gists{/gist_id}","starred_url":"https://api.github.com/users/PaymentSystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaymentSystem/subscriptions","organizations_url":"https://api.github.com/users/PaymentSystem/orgs","repos_url":"https://api.github.com/users/PaymentSystem/repos","events_url":"https://api.github.com/users/PaymentSystem/events{/privacy}","received_events_url":"https://api.github.com/users/PaymentSystem/received_events","type":"Organization","site_admin":false},"repo":{"id":152229255,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIyMjkyNTU=","name":"Application","full_name":"PaymentSystem/Application","private":false,"owner":{"login":"PaymentSystem","id":43988417,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzOTg4NDE3","avatar_url":"https://avatars3.githubusercontent.com/u/43988417?v=4","gravatar_id":"","url":"https://api.github.com/users/PaymentSystem","html_url":"https://github.com/PaymentSystem","followers_url":"https://api.github.com/users/PaymentSystem/followers","following_url":"https://api.github.com/users/PaymentSystem/following{/other_user}","gists_url":"https://api.github.com/users/PaymentSystem/gists{/gist_id}","starred_url":"https://api.github.com/users/PaymentSystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaymentSystem/subscriptions","organizations_url":"https://api.github.com/users/PaymentSystem/orgs","repos_url":"https://api.github.com/users/PaymentSystem/repos","events_url":"https://api.github.com/users/PaymentSystem/events{/privacy}","received_events_url":"https://api.github.com/users/PaymentSystem/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PaymentSystem/Application","description":null,"fork":false,"url":"https://api.github.com/repos/PaymentSystem/Application","forks_url":"https://api.github.com/repos/PaymentSystem/Application/forks","keys_url":"https://api.github.com/repos/PaymentSystem/Application/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PaymentSystem/Application/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PaymentSystem/Application/teams","hooks_url":"https://api.github.com/repos/PaymentSystem/Application/hooks","issue_events_url":"https://api.github.com/repos/PaymentSystem/Application/issues/events{/number}","events_url":"https://api.github.com/repos/PaymentSystem/Application/events","assignees_url":"https://api.github.com/repos/PaymentSystem/Application/assignees{/user}","branches_url":"https://api.github.com/repos/PaymentSystem/Application/branches{/branch}","tags_url":"https://api.github.com/repos/PaymentSystem/Application/tags","blobs_url":"https://api.github.com/repos/PaymentSystem/Application/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PaymentSystem/Application/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PaymentSystem/Application/git/refs{/sha}","trees_url":"https://api.github.com/repos/PaymentSystem/Application/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PaymentSystem/Application/statuses/{sha}","languages_url":"https://api.github.com/repos/PaymentSystem/Application/languages","stargazers_url":"https://api.github.com/repos/PaymentSystem/Application/stargazers","contributors_url":"https://api.github.com/repos/PaymentSystem/Application/contributors","subscribers_url":"https://api.github.com/repos/PaymentSystem/Application/subscribers","subscription_url":"https://api.github.com/repos/PaymentSystem/Application/subscription","commits_url":"https://api.github.com/repos/PaymentSystem/Application/commits{/sha}","git_commits_url":"https://api.github.com/repos/PaymentSystem/Application/git/commits{/sha}","comments_url":"https://api.github.com/repos/PaymentSystem/Application/comments{/number}","issue_comment_url":"https://api.github.com/repos/PaymentSystem/Application/issues/comments{/number}","contents_url":"https://api.github.com/repos/PaymentSystem/Application/contents/{+path}","compare_url":"https://api.github.com/repos/PaymentSystem/Application/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PaymentSystem/Application/merges","archive_url":"https://api.github.com/repos/PaymentSystem/Application/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PaymentSystem/Application/downloads","issues_url":"https://api.github.com/repos/PaymentSystem/Application/issues{/number}","pulls_url":"https://api.github.com/repos/PaymentSystem/Application/pulls{/number}","milestones_url":"https://api.github.com/repos/PaymentSystem/Application/milestones{/number}","notifications_url":"https://api.github.com/repos/PaymentSystem/Application/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PaymentSystem/Application/labels{/name}","releases_url":"https://api.github.com/repos/PaymentSystem/Application/releases{/id}","deployments_url":"https://api.github.com/repos/PaymentSystem/Application/deployments","created_at":"2018-10-09T10:04:07Z","updated_at":"2018-10-23T09:18:50Z","pushed_at":"2018-10-24T18:47:18Z","git_url":"git://github.com/PaymentSystem/Application.git","ssh_url":"git@github.com:PaymentSystem/Application.git","clone_url":"https://github.com/PaymentSystem/Application.git","svn_url":"https://github.com/PaymentSystem/Application","homepage":null,"size":102,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PaymentSystem/Application/pulls/21"},"html":{"href":"https://github.com/PaymentSystem/Application/pull/21"},"issue":{"href":"https://api.github.com/repos/PaymentSystem/Application/issues/21"},"comments":{"href":"https://api.github.com/repos/PaymentSystem/Application/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/PaymentSystem/Application/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/PaymentSystem/Application/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PaymentSystem/Application/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/PaymentSystem/Application/statuses/c129d4ad05e4aa627c11312c2f636ee72ba3ba91"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Meisssshu"}}