{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments/50868388","id":50868388,"diff_hunk":"@@ -2780,21 +2721,19 @@ private OMElement queryFirstAccess(String columnFamily)\n \n             }\n             rs = statement.executeQuery(query);\n-            StringBuilder returnStringBuilder = new StringBuilder(\"<omElement><rows>\");\n-            int columnCount = rs.getMetaData().getColumnCount();\n+            String year;\n+            String month;\n+            String day;\n+            APIFirstAccess firstAccess = null;\n+\n             while (rs.next()) {\n-                returnStringBuilder.append(\"<row>\");\n-                for (int i = 1; i <= columnCount; i++) {\n-                    String columnName = rs.getMetaData().getColumnName(i);\n-                    String columnValue = rs.getString(columnName);\n-                    returnStringBuilder.append(\"<\" + columnName.toLowerCase() + \">\" + columnValue +\n-                            \"</\" + columnName.toLowerCase() + \">\");\n-                }\n-                returnStringBuilder.append(\"</row>\");\n+                year = rs.getString(\"year\");","path":"components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.client/src/main/java/org/wso2/carbon/apimgt/usage/client/APIUsageStatisticsClient.java","position":483,"original_position":483,"commit_id":"fd0c987bf48bbc2e438fc7f096b7f008b8c24061","original_commit_id":"fd0c987bf48bbc2e438fc7f096b7f008b8c24061","user":{"login":"chamindias","id":8359365,"avatar_url":"https://avatars.githubusercontent.com/u/8359365?v=3","gravatar_id":"","url":"https://api.github.com/users/chamindias","html_url":"https://github.com/chamindias","followers_url":"https://api.github.com/users/chamindias/followers","following_url":"https://api.github.com/users/chamindias/following{/other_user}","gists_url":"https://api.github.com/users/chamindias/gists{/gist_id}","starred_url":"https://api.github.com/users/chamindias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamindias/subscriptions","organizations_url":"https://api.github.com/users/chamindias/orgs","repos_url":"https://api.github.com/users/chamindias/repos","events_url":"https://api.github.com/users/chamindias/events{/privacy}","received_events_url":"https://api.github.com/users/chamindias/received_events","type":"User","site_admin":false},"body":"Shall we define a constant for the texts that are used here and use them?","created_at":"2016-01-26T17:26:44Z","updated_at":"2016-01-26T17:26:44Z","html_url":"https://github.com/wso2/carbon-apimgt/pull/878#discussion_r50868388","pull_request_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/878","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments/50868388"},"html":{"href":"https://github.com/wso2/carbon-apimgt/pull/878#discussion_r50868388"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/878"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/878","id":41951138,"html_url":"https://github.com/wso2/carbon-apimgt/pull/878","diff_url":"https://github.com/wso2/carbon-apimgt/pull/878.diff","patch_url":"https://github.com/wso2/carbon-apimgt/pull/878.patch","issue_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/878","number":878,"state":"closed","locked":false,"title":"APIUsageStatisticsClient code improvement for Store Stat","user":{"login":"ruks","id":1345278,"avatar_url":"https://avatars.githubusercontent.com/u/1345278?v=3","gravatar_id":"","url":"https://api.github.com/users/ruks","html_url":"https://github.com/ruks","followers_url":"https://api.github.com/users/ruks/followers","following_url":"https://api.github.com/users/ruks/following{/other_user}","gists_url":"https://api.github.com/users/ruks/gists{/gist_id}","starred_url":"https://api.github.com/users/ruks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruks/subscriptions","organizations_url":"https://api.github.com/users/ruks/orgs","repos_url":"https://api.github.com/users/ruks/repos","events_url":"https://api.github.com/users/ruks/events{/privacy}","received_events_url":"https://api.github.com/users/ruks/received_events","type":"User","site_admin":false},"body":"https://wso2.org/jira/browse/APIMANAGER-3987 jira fixing for APIM Store Stat part.","created_at":"2015-08-08T08:57:15Z","updated_at":"2016-01-26T17:26:44Z","closed_at":"2015-08-08T13:37:11Z","merged_at":"2015-08-08T13:37:11Z","merge_commit_sha":"ac486cf85701f6d102bddd6e7ec1ad0aaece4f68","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/878/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/878/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/878/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/fd0c987bf48bbc2e438fc7f096b7f008b8c24061","head":{"label":"ruks:release-1.9.1_client","ref":"release-1.9.1_client","sha":"fd0c987bf48bbc2e438fc7f096b7f008b8c24061","user":{"login":"ruks","id":1345278,"avatar_url":"https://avatars.githubusercontent.com/u/1345278?v=3","gravatar_id":"","url":"https://api.github.com/users/ruks","html_url":"https://github.com/ruks","followers_url":"https://api.github.com/users/ruks/followers","following_url":"https://api.github.com/users/ruks/following{/other_user}","gists_url":"https://api.github.com/users/ruks/gists{/gist_id}","starred_url":"https://api.github.com/users/ruks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruks/subscriptions","organizations_url":"https://api.github.com/users/ruks/orgs","repos_url":"https://api.github.com/users/ruks/repos","events_url":"https://api.github.com/users/ruks/events{/privacy}","received_events_url":"https://api.github.com/users/ruks/received_events","type":"User","site_admin":false},"repo":{"id":38859499,"name":"carbon-apimgt","full_name":"ruks/carbon-apimgt","owner":{"login":"ruks","id":1345278,"avatar_url":"https://avatars.githubusercontent.com/u/1345278?v=3","gravatar_id":"","url":"https://api.github.com/users/ruks","html_url":"https://github.com/ruks","followers_url":"https://api.github.com/users/ruks/followers","following_url":"https://api.github.com/users/ruks/following{/other_user}","gists_url":"https://api.github.com/users/ruks/gists{/gist_id}","starred_url":"https://api.github.com/users/ruks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruks/subscriptions","organizations_url":"https://api.github.com/users/ruks/orgs","repos_url":"https://api.github.com/users/ruks/repos","events_url":"https://api.github.com/users/ruks/events{/privacy}","received_events_url":"https://api.github.com/users/ruks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ruks/carbon-apimgt","description":"","fork":true,"url":"https://api.github.com/repos/ruks/carbon-apimgt","forks_url":"https://api.github.com/repos/ruks/carbon-apimgt/forks","keys_url":"https://api.github.com/repos/ruks/carbon-apimgt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruks/carbon-apimgt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruks/carbon-apimgt/teams","hooks_url":"https://api.github.com/repos/ruks/carbon-apimgt/hooks","issue_events_url":"https://api.github.com/repos/ruks/carbon-apimgt/issues/events{/number}","events_url":"https://api.github.com/repos/ruks/carbon-apimgt/events","assignees_url":"https://api.github.com/repos/ruks/carbon-apimgt/assignees{/user}","branches_url":"https://api.github.com/repos/ruks/carbon-apimgt/branches{/branch}","tags_url":"https://api.github.com/repos/ruks/carbon-apimgt/tags","blobs_url":"https://api.github.com/repos/ruks/carbon-apimgt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruks/carbon-apimgt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruks/carbon-apimgt/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruks/carbon-apimgt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruks/carbon-apimgt/statuses/{sha}","languages_url":"https://api.github.com/repos/ruks/carbon-apimgt/languages","stargazers_url":"https://api.github.com/repos/ruks/carbon-apimgt/stargazers","contributors_url":"https://api.github.com/repos/ruks/carbon-apimgt/contributors","subscribers_url":"https://api.github.com/repos/ruks/carbon-apimgt/subscribers","subscription_url":"https://api.github.com/repos/ruks/carbon-apimgt/subscription","commits_url":"https://api.github.com/repos/ruks/carbon-apimgt/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruks/carbon-apimgt/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruks/carbon-apimgt/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruks/carbon-apimgt/issues/comments{/number}","contents_url":"https://api.github.com/repos/ruks/carbon-apimgt/contents/{+path}","compare_url":"https://api.github.com/repos/ruks/carbon-apimgt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruks/carbon-apimgt/merges","archive_url":"https://api.github.com/repos/ruks/carbon-apimgt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruks/carbon-apimgt/downloads","issues_url":"https://api.github.com/repos/ruks/carbon-apimgt/issues{/number}","pulls_url":"https://api.github.com/repos/ruks/carbon-apimgt/pulls{/number}","milestones_url":"https://api.github.com/repos/ruks/carbon-apimgt/milestones{/number}","notifications_url":"https://api.github.com/repos/ruks/carbon-apimgt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruks/carbon-apimgt/labels{/name}","releases_url":"https://api.github.com/repos/ruks/carbon-apimgt/releases{/id}","deployments_url":"https://api.github.com/repos/ruks/carbon-apimgt/deployments","created_at":"2015-07-10T03:43:50Z","updated_at":"2015-07-10T03:44:01Z","pushed_at":"2016-01-22T05:14:11Z","git_url":"git://github.com/ruks/carbon-apimgt.git","ssh_url":"git@github.com:ruks/carbon-apimgt.git","clone_url":"https://github.com/ruks/carbon-apimgt.git","svn_url":"https://github.com/ruks/carbon-apimgt","homepage":null,"size":60477,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"1.10.x.11"}},"base":{"label":"wso2:release-1.9.1","ref":"release-1.9.1","sha":"3918a8822104cc2395791bc324e49f0f052a4abb","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":17201744,"name":"carbon-apimgt","full_name":"wso2/carbon-apimgt","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/carbon-apimgt","description":"","fork":false,"url":"https://api.github.com/repos/wso2/carbon-apimgt","forks_url":"https://api.github.com/repos/wso2/carbon-apimgt/forks","keys_url":"https://api.github.com/repos/wso2/carbon-apimgt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-apimgt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-apimgt/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-apimgt/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-apimgt/events","assignees_url":"https://api.github.com/repos/wso2/carbon-apimgt/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-apimgt/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-apimgt/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-apimgt/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-apimgt/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-apimgt/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-apimgt/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-apimgt/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-apimgt/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-apimgt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-apimgt/merges","archive_url":"https://api.github.com/repos/wso2/carbon-apimgt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-apimgt/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-apimgt/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-apimgt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-apimgt/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-apimgt/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/carbon-apimgt/deployments","created_at":"2014-02-26T06:46:48Z","updated_at":"2016-01-11T04:46:27Z","pushed_at":"2016-01-26T13:58:08Z","git_url":"git://github.com/wso2/carbon-apimgt.git","ssh_url":"git@github.com:wso2/carbon-apimgt.git","clone_url":"https://github.com/wso2/carbon-apimgt.git","svn_url":"https://github.com/wso2/carbon-apimgt","homepage":null,"size":65088,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":118,"mirror_url":null,"open_issues_count":6,"forks":118,"open_issues":6,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/878"},"html":{"href":"https://github.com/wso2/carbon-apimgt/pull/878"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/issues/878"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/issues/878/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/878/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/878/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/fd0c987bf48bbc2e438fc7f096b7f008b8c24061"}}}}