{"action":"created","comment":{"url":"https://api.github.com/repos/hieumai/cura-server/pulls/comments/65650503","id":65650503,"diff_hunk":"@@ -0,0 +1,79 @@\n+package com.kms.cura.dal.database;\n+\n+import java.sql.Connection;\n+import java.sql.DriverManager;\n+import java.sql.PreparedStatement;\n+import java.sql.ResultSet;\n+import java.sql.SQLException;\n+import java.util.List;\n+\n+import com.kms.cura.entity.Entity;\n+\n+public class DatabaseHelper {\n+\tprivate static final String USE_CURA_DATABASE = \"use cura\";\n+\tprotected Connection con;\n+\tprotected PreparedStatement stmt;\n+\n+\tpublic DatabaseHelper() throws ClassNotFoundException, SQLException {\n+\t\tClass.forName(com.mysql.jdbc.Driver.class.getName());\n+\t\tcon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/\", \"root\", \"root\");","path":"com.kms.cura.dal/src/com/kms/cura/dal/database/DatabaseHelper.java","position":19,"original_position":19,"commit_id":"7549d71d81073dfd73c7431339cde6bb56ae095b","original_commit_id":"7549d71d81073dfd73c7431339cde6bb56ae095b","user":{"login":"hieumai","id":13411454,"avatar_url":"https://avatars.githubusercontent.com/u/13411454?v=3","gravatar_id":"","url":"https://api.github.com/users/hieumai","html_url":"https://github.com/hieumai","followers_url":"https://api.github.com/users/hieumai/followers","following_url":"https://api.github.com/users/hieumai/following{/other_user}","gists_url":"https://api.github.com/users/hieumai/gists{/gist_id}","starred_url":"https://api.github.com/users/hieumai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hieumai/subscriptions","organizations_url":"https://api.github.com/users/hieumai/orgs","repos_url":"https://api.github.com/users/hieumai/repos","events_url":"https://api.github.com/users/hieumai/events{/privacy}","received_events_url":"https://api.github.com/users/hieumai/received_events","type":"User","site_admin":false},"body":"Extract \"jdbc:mysql://localhost:3306/\", \"root\" and \"root\" into constant ","created_at":"2016-06-03T02:48:50Z","updated_at":"2016-06-03T02:48:50Z","html_url":"https://github.com/hieumai/cura-server/pull/5#discussion_r65650503","pull_request_url":"https://api.github.com/repos/hieumai/cura-server/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/hieumai/cura-server/pulls/comments/65650503"},"html":{"href":"https://github.com/hieumai/cura-server/pull/5#discussion_r65650503"},"pull_request":{"href":"https://api.github.com/repos/hieumai/cura-server/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/hieumai/cura-server/pulls/5","id":72441545,"html_url":"https://github.com/hieumai/cura-server/pull/5","diff_url":"https://github.com/hieumai/cura-server/pull/5.diff","patch_url":"https://github.com/hieumai/cura-server/pull/5.patch","issue_url":"https://api.github.com/repos/hieumai/cura-server/issues/5","number":5,"state":"open","locked":false,"title":"KATI-22 [Server] Create API for Account access","user":{"login":"huuduy216","id":10777843,"avatar_url":"https://avatars.githubusercontent.com/u/10777843?v=3","gravatar_id":"","url":"https://api.github.com/users/huuduy216","html_url":"https://github.com/huuduy216","followers_url":"https://api.github.com/users/huuduy216/followers","following_url":"https://api.github.com/users/huuduy216/following{/other_user}","gists_url":"https://api.github.com/users/huuduy216/gists{/gist_id}","starred_url":"https://api.github.com/users/huuduy216/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huuduy216/subscriptions","organizations_url":"https://api.github.com/users/huuduy216/orgs","repos_url":"https://api.github.com/users/huuduy216/repos","events_url":"https://api.github.com/users/huuduy216/events{/privacy}","received_events_url":"https://api.github.com/users/huuduy216/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-03T01:17:49Z","updated_at":"2016-06-03T02:48:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32f8006a91e703e8d014de806df08c0c82c9c19a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hieumai/cura-server/pulls/5/commits","review_comments_url":"https://api.github.com/repos/hieumai/cura-server/pulls/5/comments","review_comment_url":"https://api.github.com/repos/hieumai/cura-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hieumai/cura-server/issues/5/comments","statuses_url":"https://api.github.com/repos/hieumai/cura-server/statuses/7549d71d81073dfd73c7431339cde6bb56ae095b","head":{"label":"hieumai:KATI-22","ref":"KATI-22","sha":"7549d71d81073dfd73c7431339cde6bb56ae095b","user":{"login":"hieumai","id":13411454,"avatar_url":"https://avatars.githubusercontent.com/u/13411454?v=3","gravatar_id":"","url":"https://api.github.com/users/hieumai","html_url":"https://github.com/hieumai","followers_url":"https://api.github.com/users/hieumai/followers","following_url":"https://api.github.com/users/hieumai/following{/other_user}","gists_url":"https://api.github.com/users/hieumai/gists{/gist_id}","starred_url":"https://api.github.com/users/hieumai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hieumai/subscriptions","organizations_url":"https://api.github.com/users/hieumai/orgs","repos_url":"https://api.github.com/users/hieumai/repos","events_url":"https://api.github.com/users/hieumai/events{/privacy}","received_events_url":"https://api.github.com/users/hieumai/received_events","type":"User","site_admin":false},"repo":{"id":59567461,"name":"cura-server","full_name":"hieumai/cura-server","owner":{"login":"hieumai","id":13411454,"avatar_url":"https://avatars.githubusercontent.com/u/13411454?v=3","gravatar_id":"","url":"https://api.github.com/users/hieumai","html_url":"https://github.com/hieumai","followers_url":"https://api.github.com/users/hieumai/followers","following_url":"https://api.github.com/users/hieumai/following{/other_user}","gists_url":"https://api.github.com/users/hieumai/gists{/gist_id}","starred_url":"https://api.github.com/users/hieumai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hieumai/subscriptions","organizations_url":"https://api.github.com/users/hieumai/orgs","repos_url":"https://api.github.com/users/hieumai/repos","events_url":"https://api.github.com/users/hieumai/events{/privacy}","received_events_url":"https://api.github.com/users/hieumai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hieumai/cura-server","description":"Server side for Cura","fork":false,"url":"https://api.github.com/repos/hieumai/cura-server","forks_url":"https://api.github.com/repos/hieumai/cura-server/forks","keys_url":"https://api.github.com/repos/hieumai/cura-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hieumai/cura-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hieumai/cura-server/teams","hooks_url":"https://api.github.com/repos/hieumai/cura-server/hooks","issue_events_url":"https://api.github.com/repos/hieumai/cura-server/issues/events{/number}","events_url":"https://api.github.com/repos/hieumai/cura-server/events","assignees_url":"https://api.github.com/repos/hieumai/cura-server/assignees{/user}","branches_url":"https://api.github.com/repos/hieumai/cura-server/branches{/branch}","tags_url":"https://api.github.com/repos/hieumai/cura-server/tags","blobs_url":"https://api.github.com/repos/hieumai/cura-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hieumai/cura-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hieumai/cura-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/hieumai/cura-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hieumai/cura-server/statuses/{sha}","languages_url":"https://api.github.com/repos/hieumai/cura-server/languages","stargazers_url":"https://api.github.com/repos/hieumai/cura-server/stargazers","contributors_url":"https://api.github.com/repos/hieumai/cura-server/contributors","subscribers_url":"https://api.github.com/repos/hieumai/cura-server/subscribers","subscription_url":"https://api.github.com/repos/hieumai/cura-server/subscription","commits_url":"https://api.github.com/repos/hieumai/cura-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/hieumai/cura-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/hieumai/cura-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/hieumai/cura-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/hieumai/cura-server/contents/{+path}","compare_url":"https://api.github.com/repos/hieumai/cura-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hieumai/cura-server/merges","archive_url":"https://api.github.com/repos/hieumai/cura-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hieumai/cura-server/downloads","issues_url":"https://api.github.com/repos/hieumai/cura-server/issues{/number}","pulls_url":"https://api.github.com/repos/hieumai/cura-server/pulls{/number}","milestones_url":"https://api.github.com/repos/hieumai/cura-server/milestones{/number}","notifications_url":"https://api.github.com/repos/hieumai/cura-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hieumai/cura-server/labels{/name}","releases_url":"https://api.github.com/repos/hieumai/cura-server/releases{/id}","deployments_url":"https://api.github.com/repos/hieumai/cura-server/deployments","created_at":"2016-05-24T11:32:00Z","updated_at":"2016-05-27T09:47:43Z","pushed_at":"2016-06-03T01:17:49Z","git_url":"git://github.com/hieumai/cura-server.git","ssh_url":"git@github.com:hieumai/cura-server.git","clone_url":"https://github.com/hieumai/cura-server.git","svn_url":"https://github.com/hieumai/cura-server","homepage":null,"size":67,"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":"hieumai:master","ref":"master","sha":"188c022aff04ebfac82849eb2361be6049c518bd","user":{"login":"hieumai","id":13411454,"avatar_url":"https://avatars.githubusercontent.com/u/13411454?v=3","gravatar_id":"","url":"https://api.github.com/users/hieumai","html_url":"https://github.com/hieumai","followers_url":"https://api.github.com/users/hieumai/followers","following_url":"https://api.github.com/users/hieumai/following{/other_user}","gists_url":"https://api.github.com/users/hieumai/gists{/gist_id}","starred_url":"https://api.github.com/users/hieumai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hieumai/subscriptions","organizations_url":"https://api.github.com/users/hieumai/orgs","repos_url":"https://api.github.com/users/hieumai/repos","events_url":"https://api.github.com/users/hieumai/events{/privacy}","received_events_url":"https://api.github.com/users/hieumai/received_events","type":"User","site_admin":false},"repo":{"id":59567461,"name":"cura-server","full_name":"hieumai/cura-server","owner":{"login":"hieumai","id":13411454,"avatar_url":"https://avatars.githubusercontent.com/u/13411454?v=3","gravatar_id":"","url":"https://api.github.com/users/hieumai","html_url":"https://github.com/hieumai","followers_url":"https://api.github.com/users/hieumai/followers","following_url":"https://api.github.com/users/hieumai/following{/other_user}","gists_url":"https://api.github.com/users/hieumai/gists{/gist_id}","starred_url":"https://api.github.com/users/hieumai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hieumai/subscriptions","organizations_url":"https://api.github.com/users/hieumai/orgs","repos_url":"https://api.github.com/users/hieumai/repos","events_url":"https://api.github.com/users/hieumai/events{/privacy}","received_events_url":"https://api.github.com/users/hieumai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hieumai/cura-server","description":"Server side for Cura","fork":false,"url":"https://api.github.com/repos/hieumai/cura-server","forks_url":"https://api.github.com/repos/hieumai/cura-server/forks","keys_url":"https://api.github.com/repos/hieumai/cura-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hieumai/cura-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hieumai/cura-server/teams","hooks_url":"https://api.github.com/repos/hieumai/cura-server/hooks","issue_events_url":"https://api.github.com/repos/hieumai/cura-server/issues/events{/number}","events_url":"https://api.github.com/repos/hieumai/cura-server/events","assignees_url":"https://api.github.com/repos/hieumai/cura-server/assignees{/user}","branches_url":"https://api.github.com/repos/hieumai/cura-server/branches{/branch}","tags_url":"https://api.github.com/repos/hieumai/cura-server/tags","blobs_url":"https://api.github.com/repos/hieumai/cura-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hieumai/cura-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hieumai/cura-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/hieumai/cura-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hieumai/cura-server/statuses/{sha}","languages_url":"https://api.github.com/repos/hieumai/cura-server/languages","stargazers_url":"https://api.github.com/repos/hieumai/cura-server/stargazers","contributors_url":"https://api.github.com/repos/hieumai/cura-server/contributors","subscribers_url":"https://api.github.com/repos/hieumai/cura-server/subscribers","subscription_url":"https://api.github.com/repos/hieumai/cura-server/subscription","commits_url":"https://api.github.com/repos/hieumai/cura-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/hieumai/cura-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/hieumai/cura-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/hieumai/cura-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/hieumai/cura-server/contents/{+path}","compare_url":"https://api.github.com/repos/hieumai/cura-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hieumai/cura-server/merges","archive_url":"https://api.github.com/repos/hieumai/cura-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hieumai/cura-server/downloads","issues_url":"https://api.github.com/repos/hieumai/cura-server/issues{/number}","pulls_url":"https://api.github.com/repos/hieumai/cura-server/pulls{/number}","milestones_url":"https://api.github.com/repos/hieumai/cura-server/milestones{/number}","notifications_url":"https://api.github.com/repos/hieumai/cura-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hieumai/cura-server/labels{/name}","releases_url":"https://api.github.com/repos/hieumai/cura-server/releases{/id}","deployments_url":"https://api.github.com/repos/hieumai/cura-server/deployments","created_at":"2016-05-24T11:32:00Z","updated_at":"2016-05-27T09:47:43Z","pushed_at":"2016-06-03T01:17:49Z","git_url":"git://github.com/hieumai/cura-server.git","ssh_url":"git@github.com:hieumai/cura-server.git","clone_url":"https://github.com/hieumai/cura-server.git","svn_url":"https://github.com/hieumai/cura-server","homepage":null,"size":67,"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/hieumai/cura-server/pulls/5"},"html":{"href":"https://github.com/hieumai/cura-server/pull/5"},"issue":{"href":"https://api.github.com/repos/hieumai/cura-server/issues/5"},"comments":{"href":"https://api.github.com/repos/hieumai/cura-server/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/hieumai/cura-server/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/hieumai/cura-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hieumai/cura-server/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/hieumai/cura-server/statuses/7549d71d81073dfd73c7431339cde6bb56ae095b"}}}}
{"actor":{"display_login":"hieumai"}}