{"action":"created","comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/comments/47517448","id":47517448,"diff_hunk":"@@ -109,6 +144,90 @@ public void setTablePrefix(String tablePrefix) {\n \t\tthis.tablePrefix = tablePrefix;\n \t}\n \n+\t@Override\n+\tpublic TaskExecution getTaskExecution(String executionId) {\n+\t\ttry {\n+\t\t\tTaskExecution taskExecution = jdbcTemplate.queryForObject(getQuery(GET_EXECUTION_BY_ID),\n+\t\t\t\t\tnew TaskExecutionRowMapper(), executionId);\n+\t\t\ttaskExecution.setParameters(getTaskParameters(executionId));\n+\t\t\treturn taskExecution;\n+\t\t}\n+\t\tcatch (EmptyResultDataAccessException e) {\n+\t\t\treturn null;\n+\t\t}\n+\t}\n+\n+\t@Override\n+\tpublic long getTaskExecutionCount(String taskName) {\n+\t\ttry {\n+\t\treturn jdbcTemplate.queryForObject(\n+\t\t\t\tgetQuery(TASK_EXECUTION_COUNT), new Object[] { taskName }, Long.class);\n+\t\t}\n+\t\tcatch (EmptyResultDataAccessException e) {\n+\t\t\treturn 0;\n+\t\t}\n+\n+\t}\n+\n+\t@Override\n+\tpublic Set<TaskExecution> findRunningTaskExecutions(String taskName) {\n+\t\tfinal Set<TaskExecution> result = new HashSet<TaskExecution>();\n+\t\tRowCallbackHandler handler = new RowCallbackHandler() {\n+\t\t\t@Override\n+\t\t\tpublic void processRow(ResultSet rs) throws SQLException {\n+\t\t\t\tTaskExecutionRowMapper mapper = new TaskExecutionRowMapper();\n+\t\t\t\tresult.add(mapper.mapRow(rs, 0));\n+\t\t\t}\n+\t\t};\n+\t\tjdbcTemplate.query(getQuery(FIND_RUNNING_TASK_EXECUTIONS),\n+\t\t\t\tnew Object[] { taskName }, handler);","path":"spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/JdbcTaskExecutionDao.java","position":107,"original_position":107,"commit_id":"ec8786d7ea494351b7a024f5aeb716dca2d8ba50","original_commit_id":"ec8786d7ea494351b7a024f5aeb716dca2d8ba50","user":{"login":"mminella","id":630743,"avatar_url":"https://avatars.githubusercontent.com/u/630743?v=3","gravatar_id":"","url":"https://api.github.com/users/mminella","html_url":"https://github.com/mminella","followers_url":"https://api.github.com/users/mminella/followers","following_url":"https://api.github.com/users/mminella/following{/other_user}","gists_url":"https://api.github.com/users/mminella/gists{/gist_id}","starred_url":"https://api.github.com/users/mminella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mminella/subscriptions","organizations_url":"https://api.github.com/users/mminella/orgs","repos_url":"https://api.github.com/users/mminella/repos","events_url":"https://api.github.com/users/mminella/events{/privacy}","received_events_url":"https://api.github.com/users/mminella/received_events","type":"User","site_admin":false},"body":"Why use a `RowCallbackHandler` here instead of just a `RowMapper` with `queryForObject`?","created_at":"2015-12-14T16:16:54Z","updated_at":"2015-12-14T16:16:54Z","html_url":"https://github.com/spring-cloud/spring-cloud-task/pull/30#discussion_r47517448","pull_request_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/comments/47517448"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-task/pull/30#discussion_r47517448"},"pull_request":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/30","id":53276506,"html_url":"https://github.com/spring-cloud/spring-cloud-task/pull/30","diff_url":"https://github.com/spring-cloud/spring-cloud-task/pull/30.diff","patch_url":"https://github.com/spring-cloud/spring-cloud-task/pull/30.patch","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/issues/30","number":30,"state":"open","locked":false,"title":"SCT-7 Add TaskExplorer implementation","user":{"login":"cppwfs","id":695673,"avatar_url":"https://avatars.githubusercontent.com/u/695673?v=3","gravatar_id":"","url":"https://api.github.com/users/cppwfs","html_url":"https://github.com/cppwfs","followers_url":"https://api.github.com/users/cppwfs/followers","following_url":"https://api.github.com/users/cppwfs/following{/other_user}","gists_url":"https://api.github.com/users/cppwfs/gists{/gist_id}","starred_url":"https://api.github.com/users/cppwfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cppwfs/subscriptions","organizations_url":"https://api.github.com/users/cppwfs/orgs","repos_url":"https://api.github.com/users/cppwfs/repos","events_url":"https://api.github.com/users/cppwfs/events{/privacy}","received_events_url":"https://api.github.com/users/cppwfs/received_events","type":"User","site_admin":false},"body":"* Supports SimpleTaskExplorer that accepts a TaskExecutionDao.\r\n* Updated Dao's to support the explorer query requirements\r\n* Added tests.\r\n* Rebased\r\n\r\nThis resolves spring-cloud/spring-cloud-task#7","created_at":"2015-12-10T15:52:48Z","updated_at":"2015-12-14T16:16:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"114e51bd2936b73df9b5203b0bcbf15d2189c4eb","assignee":{"login":"mminella","id":630743,"avatar_url":"https://avatars.githubusercontent.com/u/630743?v=3","gravatar_id":"","url":"https://api.github.com/users/mminella","html_url":"https://github.com/mminella","followers_url":"https://api.github.com/users/mminella/followers","following_url":"https://api.github.com/users/mminella/following{/other_user}","gists_url":"https://api.github.com/users/mminella/gists{/gist_id}","starred_url":"https://api.github.com/users/mminella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mminella/subscriptions","organizations_url":"https://api.github.com/users/mminella/orgs","repos_url":"https://api.github.com/users/mminella/repos","events_url":"https://api.github.com/users/mminella/events{/privacy}","received_events_url":"https://api.github.com/users/mminella/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/30/commits","review_comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/30/comments","review_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/issues/30/comments","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/statuses/ec8786d7ea494351b7a024f5aeb716dca2d8ba50","head":{"label":"cppwfs:SCT-7","ref":"SCT-7","sha":"ec8786d7ea494351b7a024f5aeb716dca2d8ba50","user":{"login":"cppwfs","id":695673,"avatar_url":"https://avatars.githubusercontent.com/u/695673?v=3","gravatar_id":"","url":"https://api.github.com/users/cppwfs","html_url":"https://github.com/cppwfs","followers_url":"https://api.github.com/users/cppwfs/followers","following_url":"https://api.github.com/users/cppwfs/following{/other_user}","gists_url":"https://api.github.com/users/cppwfs/gists{/gist_id}","starred_url":"https://api.github.com/users/cppwfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cppwfs/subscriptions","organizations_url":"https://api.github.com/users/cppwfs/orgs","repos_url":"https://api.github.com/users/cppwfs/repos","events_url":"https://api.github.com/users/cppwfs/events{/privacy}","received_events_url":"https://api.github.com/users/cppwfs/received_events","type":"User","site_admin":false},"repo":{"id":41924843,"name":"spring-cloud-task","full_name":"cppwfs/spring-cloud-task","owner":{"login":"cppwfs","id":695673,"avatar_url":"https://avatars.githubusercontent.com/u/695673?v=3","gravatar_id":"","url":"https://api.github.com/users/cppwfs","html_url":"https://github.com/cppwfs","followers_url":"https://api.github.com/users/cppwfs/followers","following_url":"https://api.github.com/users/cppwfs/following{/other_user}","gists_url":"https://api.github.com/users/cppwfs/gists{/gist_id}","starred_url":"https://api.github.com/users/cppwfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cppwfs/subscriptions","organizations_url":"https://api.github.com/users/cppwfs/orgs","repos_url":"https://api.github.com/users/cppwfs/repos","events_url":"https://api.github.com/users/cppwfs/events{/privacy}","received_events_url":"https://api.github.com/users/cppwfs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cppwfs/spring-cloud-task","description":"","fork":true,"url":"https://api.github.com/repos/cppwfs/spring-cloud-task","forks_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/forks","keys_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/teams","hooks_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/hooks","issue_events_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/issues/events{/number}","events_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/events","assignees_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/assignees{/user}","branches_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/branches{/branch}","tags_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/tags","blobs_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/git/refs{/sha}","trees_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/statuses/{sha}","languages_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/languages","stargazers_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/stargazers","contributors_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/contributors","subscribers_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/subscribers","subscription_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/subscription","commits_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/commits{/sha}","git_commits_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/git/commits{/sha}","comments_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/comments{/number}","issue_comment_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/issues/comments{/number}","contents_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/contents/{+path}","compare_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/merges","archive_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/downloads","issues_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/issues{/number}","pulls_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/pulls{/number}","milestones_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/milestones{/number}","notifications_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/labels{/name}","releases_url":"https://api.github.com/repos/cppwfs/spring-cloud-task/releases{/id}","created_at":"2015-09-04T15:59:14Z","updated_at":"2015-11-20T21:13:47Z","pushed_at":"2015-12-11T22:17:56Z","git_url":"git://github.com/cppwfs/spring-cloud-task.git","ssh_url":"git@github.com:cppwfs/spring-cloud-task.git","clone_url":"https://github.com/cppwfs/spring-cloud-task.git","svn_url":"https://github.com/cppwfs/spring-cloud-task","homepage":null,"size":117,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"master"}},"base":{"label":"spring-cloud:master","ref":"master","sha":"1ea5020abc4bcc0b9f7de5f94ce16e42b65ec665","user":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"repo":{"id":41825227,"name":"spring-cloud-task","full_name":"spring-cloud/spring-cloud-task","owner":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-cloud/spring-cloud-task","description":"","fork":false,"url":"https://api.github.com/repos/spring-cloud/spring-cloud-task","forks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/forks","keys_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/teams","hooks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/hooks","issue_events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/issues/events{/number}","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/events","assignees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/assignees{/user}","branches_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/branches{/branch}","tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/tags","blobs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/languages","stargazers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/stargazers","contributors_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/contributors","subscribers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/subscribers","subscription_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/subscription","commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/contents/{+path}","compare_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/merges","archive_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/downloads","issues_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/issues{/number}","pulls_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/labels{/name}","releases_url":"https://api.github.com/repos/spring-cloud/spring-cloud-task/releases{/id}","created_at":"2015-09-02T20:12:00Z","updated_at":"2015-11-24T16:42:43Z","pushed_at":"2015-12-14T16:07:36Z","git_url":"git://github.com/spring-cloud/spring-cloud-task.git","ssh_url":"git@github.com:spring-cloud/spring-cloud-task.git","clone_url":"https://github.com/spring-cloud/spring-cloud-task.git","svn_url":"https://github.com/spring-cloud/spring-cloud-task","homepage":null,"size":120,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":22,"forks":7,"open_issues":22,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/30"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-task/pull/30"},"issue":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-task/issues/30"},"comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-task/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-task/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-task/statuses/ec8786d7ea494351b7a024f5aeb716dca2d8ba50"}}}}