{"action":"created","comment":{"url":"https://api.github.com/repos/DBCDK/ors2/pulls/comments/209879536","pull_request_review_id":145975976,"id":209879536,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTg3OTUzNg==","diff_hunk":"@@ -679,21 +668,14 @@ public OrderEntity getOrderAndDetach(final Long orderKey) {\n         }\n     }\n \n-    protected void buildOrderSearch(StringBuilder sb, List<Object> parameterList, final SearchOrderRequestJSON searchOrderRequestJSON) {\n-        LOGGER.entry(sb, parameterList, searchOrderRequestJSON);\n-        StopWatch stopWatch = new Log4JStopWatch(\"EntityDAO.buildOrderSearch\");\n-        try {\n-            sb.append(\"SELECT o.* FROM ors_order o\");\n-            appendOrderMatchTableCondition(sb, searchOrderRequestJSON);\n-            sb.append(\" WHERE\");\n-            appendOrderMatchConditions(sb, parameterList, searchOrderRequestJSON);\n-            appendOrderQueryCondition(sb, parameterList, searchOrderRequestJSON);\n-            appendJsonQueryCondition(sb, parameterList, searchOrderRequestJSON);\n-            appendOrderDateQueryConditions(sb, parameterList, searchOrderRequestJSON);\n-            sb.append(\" ORDER BY o.order_key DESC\");\n-        } finally {\n-            stopWatch.stop();\n-            LOGGER.exit();\n+    private void setStartAndMaxResults(SearchOrderRequestJSON searchOrderRequestJSON, Query orderEntityQuery) {\n+        if (searchOrderRequestJSON.getStart() != null) {\n+            orderEntityQuery.setFirstResult(searchOrderRequestJSON.getStart());\n+        }\n+        if (searchOrderRequestJSON.getStepValue() != null && searchOrderRequestJSON.getStepValue() < MAX_RESULTS) {","path":"ors-commons/src/main/java/dk/dbc/ors/database/EntityDAO.java","position":127,"original_position":127,"commit_id":"c862c9d2d919ad569b90789906c7d69301bfd143","original_commit_id":"c862c9d2d919ad569b90789906c7d69301bfd143","user":{"login":"thldbc","id":25340503,"node_id":"MDQ6VXNlcjI1MzQwNTAz","avatar_url":"https://avatars1.githubusercontent.com/u/25340503?v=4","gravatar_id":"","url":"https://api.github.com/users/thldbc","html_url":"https://github.com/thldbc","followers_url":"https://api.github.com/users/thldbc/followers","following_url":"https://api.github.com/users/thldbc/following{/other_user}","gists_url":"https://api.github.com/users/thldbc/gists{/gist_id}","starred_url":"https://api.github.com/users/thldbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thldbc/subscriptions","organizations_url":"https://api.github.com/users/thldbc/orgs","repos_url":"https://api.github.com/users/thldbc/repos","events_url":"https://api.github.com/users/thldbc/events{/privacy}","received_events_url":"https://api.github.com/users/thldbc/received_events","type":"User","site_admin":false},"body":"Godt spottet! Så bliver setMaxResults på query objectet skal til 0. Max skal selvfølgelig være mindst 1","created_at":"2018-08-14T09:09:05Z","updated_at":"2018-08-14T09:09:05Z","html_url":"https://github.com/DBCDK/ors2/pull/196#discussion_r209879536","pull_request_url":"https://api.github.com/repos/DBCDK/ors2/pulls/196","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DBCDK/ors2/pulls/comments/209879536"},"html":{"href":"https://github.com/DBCDK/ors2/pull/196#discussion_r209879536"},"pull_request":{"href":"https://api.github.com/repos/DBCDK/ors2/pulls/196"}},"in_reply_to_id":209850116},"pull_request":{"url":"https://api.github.com/repos/DBCDK/ors2/pulls/196","id":208167172,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MTY3MTcy","html_url":"https://github.com/DBCDK/ors2/pull/196","diff_url":"https://github.com/DBCDK/ors2/pull/196.diff","patch_url":"https://github.com/DBCDK/ors2/pull/196.patch","issue_url":"https://api.github.com/repos/DBCDK/ors2/issues/196","number":196,"state":"open","locked":false,"title":"#185 maintenance api","user":{"login":"thldbc","id":25340503,"node_id":"MDQ6VXNlcjI1MzQwNTAz","avatar_url":"https://avatars1.githubusercontent.com/u/25340503?v=4","gravatar_id":"","url":"https://api.github.com/users/thldbc","html_url":"https://github.com/thldbc","followers_url":"https://api.github.com/users/thldbc/followers","following_url":"https://api.github.com/users/thldbc/following{/other_user}","gists_url":"https://api.github.com/users/thldbc/gists{/gist_id}","starred_url":"https://api.github.com/users/thldbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thldbc/subscriptions","organizations_url":"https://api.github.com/users/thldbc/orgs","repos_url":"https://api.github.com/users/thldbc/repos","events_url":"https://api.github.com/users/thldbc/events{/privacy}","received_events_url":"https://api.github.com/users/thldbc/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-14T04:41:17Z","updated_at":"2018-08-14T09:09:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"400a02da5fec75e70b3cc1c19f0705360cbae29c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"lucaspuvis","id":42344760,"node_id":"MDQ6VXNlcjQyMzQ0NzYw","avatar_url":"https://avatars0.githubusercontent.com/u/42344760?v=4","gravatar_id":"","url":"https://api.github.com/users/lucaspuvis","html_url":"https://github.com/lucaspuvis","followers_url":"https://api.github.com/users/lucaspuvis/followers","following_url":"https://api.github.com/users/lucaspuvis/following{/other_user}","gists_url":"https://api.github.com/users/lucaspuvis/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaspuvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaspuvis/subscriptions","organizations_url":"https://api.github.com/users/lucaspuvis/orgs","repos_url":"https://api.github.com/users/lucaspuvis/repos","events_url":"https://api.github.com/users/lucaspuvis/events{/privacy}","received_events_url":"https://api.github.com/users/lucaspuvis/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DBCDK/ors2/pulls/196/commits","review_comments_url":"https://api.github.com/repos/DBCDK/ors2/pulls/196/comments","review_comment_url":"https://api.github.com/repos/DBCDK/ors2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DBCDK/ors2/issues/196/comments","statuses_url":"https://api.github.com/repos/DBCDK/ors2/statuses/c862c9d2d919ad569b90789906c7d69301bfd143","head":{"label":"DBCDK:#185_maintenance_api","ref":"#185_maintenance_api","sha":"c862c9d2d919ad569b90789906c7d69301bfd143","user":{"login":"DBCDK","id":555633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1NTYzMw==","avatar_url":"https://avatars0.githubusercontent.com/u/555633?v=4","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"repo":{"id":79997169,"node_id":"MDEwOlJlcG9zaXRvcnk3OTk5NzE2OQ==","name":"ors2","full_name":"DBCDK/ors2","owner":{"login":"DBCDK","id":555633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1NTYzMw==","avatar_url":"https://avatars0.githubusercontent.com/u/555633?v=4","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DBCDK/ors2","description":"ORS 2","fork":false,"url":"https://api.github.com/repos/DBCDK/ors2","forks_url":"https://api.github.com/repos/DBCDK/ors2/forks","keys_url":"https://api.github.com/repos/DBCDK/ors2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DBCDK/ors2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DBCDK/ors2/teams","hooks_url":"https://api.github.com/repos/DBCDK/ors2/hooks","issue_events_url":"https://api.github.com/repos/DBCDK/ors2/issues/events{/number}","events_url":"https://api.github.com/repos/DBCDK/ors2/events","assignees_url":"https://api.github.com/repos/DBCDK/ors2/assignees{/user}","branches_url":"https://api.github.com/repos/DBCDK/ors2/branches{/branch}","tags_url":"https://api.github.com/repos/DBCDK/ors2/tags","blobs_url":"https://api.github.com/repos/DBCDK/ors2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DBCDK/ors2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DBCDK/ors2/git/refs{/sha}","trees_url":"https://api.github.com/repos/DBCDK/ors2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DBCDK/ors2/statuses/{sha}","languages_url":"https://api.github.com/repos/DBCDK/ors2/languages","stargazers_url":"https://api.github.com/repos/DBCDK/ors2/stargazers","contributors_url":"https://api.github.com/repos/DBCDK/ors2/contributors","subscribers_url":"https://api.github.com/repos/DBCDK/ors2/subscribers","subscription_url":"https://api.github.com/repos/DBCDK/ors2/subscription","commits_url":"https://api.github.com/repos/DBCDK/ors2/commits{/sha}","git_commits_url":"https://api.github.com/repos/DBCDK/ors2/git/commits{/sha}","comments_url":"https://api.github.com/repos/DBCDK/ors2/comments{/number}","issue_comment_url":"https://api.github.com/repos/DBCDK/ors2/issues/comments{/number}","contents_url":"https://api.github.com/repos/DBCDK/ors2/contents/{+path}","compare_url":"https://api.github.com/repos/DBCDK/ors2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DBCDK/ors2/merges","archive_url":"https://api.github.com/repos/DBCDK/ors2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DBCDK/ors2/downloads","issues_url":"https://api.github.com/repos/DBCDK/ors2/issues{/number}","pulls_url":"https://api.github.com/repos/DBCDK/ors2/pulls{/number}","milestones_url":"https://api.github.com/repos/DBCDK/ors2/milestones{/number}","notifications_url":"https://api.github.com/repos/DBCDK/ors2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DBCDK/ors2/labels{/name}","releases_url":"https://api.github.com/repos/DBCDK/ors2/releases{/id}","deployments_url":"https://api.github.com/repos/DBCDK/ors2/deployments","created_at":"2017-01-25T08:44:26Z","updated_at":"2018-08-13T14:33:46Z","pushed_at":"2018-08-14T04:41:17Z","git_url":"git://github.com/DBCDK/ors2.git","ssh_url":"git@github.com:DBCDK/ors2.git","clone_url":"https://github.com/DBCDK/ors2.git","svn_url":"https://github.com/DBCDK/ors2","homepage":null,"size":4943,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","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":52,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":52,"watchers":3,"default_branch":"master"}},"base":{"label":"DBCDK:master","ref":"master","sha":"1760b434d1fdba619828ea92dd300f614211a945","user":{"login":"DBCDK","id":555633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1NTYzMw==","avatar_url":"https://avatars0.githubusercontent.com/u/555633?v=4","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"repo":{"id":79997169,"node_id":"MDEwOlJlcG9zaXRvcnk3OTk5NzE2OQ==","name":"ors2","full_name":"DBCDK/ors2","owner":{"login":"DBCDK","id":555633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1NTYzMw==","avatar_url":"https://avatars0.githubusercontent.com/u/555633?v=4","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DBCDK/ors2","description":"ORS 2","fork":false,"url":"https://api.github.com/repos/DBCDK/ors2","forks_url":"https://api.github.com/repos/DBCDK/ors2/forks","keys_url":"https://api.github.com/repos/DBCDK/ors2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DBCDK/ors2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DBCDK/ors2/teams","hooks_url":"https://api.github.com/repos/DBCDK/ors2/hooks","issue_events_url":"https://api.github.com/repos/DBCDK/ors2/issues/events{/number}","events_url":"https://api.github.com/repos/DBCDK/ors2/events","assignees_url":"https://api.github.com/repos/DBCDK/ors2/assignees{/user}","branches_url":"https://api.github.com/repos/DBCDK/ors2/branches{/branch}","tags_url":"https://api.github.com/repos/DBCDK/ors2/tags","blobs_url":"https://api.github.com/repos/DBCDK/ors2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DBCDK/ors2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DBCDK/ors2/git/refs{/sha}","trees_url":"https://api.github.com/repos/DBCDK/ors2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DBCDK/ors2/statuses/{sha}","languages_url":"https://api.github.com/repos/DBCDK/ors2/languages","stargazers_url":"https://api.github.com/repos/DBCDK/ors2/stargazers","contributors_url":"https://api.github.com/repos/DBCDK/ors2/contributors","subscribers_url":"https://api.github.com/repos/DBCDK/ors2/subscribers","subscription_url":"https://api.github.com/repos/DBCDK/ors2/subscription","commits_url":"https://api.github.com/repos/DBCDK/ors2/commits{/sha}","git_commits_url":"https://api.github.com/repos/DBCDK/ors2/git/commits{/sha}","comments_url":"https://api.github.com/repos/DBCDK/ors2/comments{/number}","issue_comment_url":"https://api.github.com/repos/DBCDK/ors2/issues/comments{/number}","contents_url":"https://api.github.com/repos/DBCDK/ors2/contents/{+path}","compare_url":"https://api.github.com/repos/DBCDK/ors2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DBCDK/ors2/merges","archive_url":"https://api.github.com/repos/DBCDK/ors2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DBCDK/ors2/downloads","issues_url":"https://api.github.com/repos/DBCDK/ors2/issues{/number}","pulls_url":"https://api.github.com/repos/DBCDK/ors2/pulls{/number}","milestones_url":"https://api.github.com/repos/DBCDK/ors2/milestones{/number}","notifications_url":"https://api.github.com/repos/DBCDK/ors2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DBCDK/ors2/labels{/name}","releases_url":"https://api.github.com/repos/DBCDK/ors2/releases{/id}","deployments_url":"https://api.github.com/repos/DBCDK/ors2/deployments","created_at":"2017-01-25T08:44:26Z","updated_at":"2018-08-13T14:33:46Z","pushed_at":"2018-08-14T04:41:17Z","git_url":"git://github.com/DBCDK/ors2.git","ssh_url":"git@github.com:DBCDK/ors2.git","clone_url":"https://github.com/DBCDK/ors2.git","svn_url":"https://github.com/DBCDK/ors2","homepage":null,"size":4943,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","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":52,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":52,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DBCDK/ors2/pulls/196"},"html":{"href":"https://github.com/DBCDK/ors2/pull/196"},"issue":{"href":"https://api.github.com/repos/DBCDK/ors2/issues/196"},"comments":{"href":"https://api.github.com/repos/DBCDK/ors2/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/DBCDK/ors2/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/DBCDK/ors2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DBCDK/ors2/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/DBCDK/ors2/statuses/c862c9d2d919ad569b90789906c7d69301bfd143"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"thldbc"}}