From 1114c72f03abfc4bf69fe63b90ce76763903bf5f Mon Sep 17 00:00:00 2001
From: JasonRoberts-smile
<85363818+JasonRoberts-smile@users.noreply.github.com>
Date: Thu, 21 Apr 2022 09:51:19 -0400
Subject: [PATCH] Further expunge refactoring (#3550)
* convert expunge public interfaces to use ResourcePersistentId instead of Long
* changelog
* version bump
---
hapi-deployable-pom/pom.xml | 2 +-
hapi-fhir-android/pom.xml | 2 +-
hapi-fhir-base/pom.xml | 2 +-
hapi-fhir-batch/pom.xml | 2 +-
hapi-fhir-bom/pom.xml | 4 +-
hapi-fhir-checkstyle/pom.xml | 2 +-
hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 2 +-
hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 2 +-
hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml | 2 +-
hapi-fhir-cli/pom.xml | 2 +-
hapi-fhir-client-okhttp/pom.xml | 2 +-
hapi-fhir-client/pom.xml | 2 +-
hapi-fhir-converter/pom.xml | 2 +-
hapi-fhir-dist/pom.xml | 2 +-
hapi-fhir-docs/pom.xml | 2 +-
.../6_0_0/3550-expunge-resource-ids.yaml | 5 ++
hapi-fhir-jacoco/pom.xml | 2 +-
hapi-fhir-jaxrsserver-base/pom.xml | 2 +-
hapi-fhir-jpa/pom.xml | 2 +-
hapi-fhir-jpaserver-base/pom.xml | 2 +-
.../jpa/batch/mdm/job/MdmLinkDeleter.java | 8 +--
.../ca/uhn/fhir/jpa/config/JpaConfig.java | 5 +-
.../ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java | 3 +-
.../fhir/jpa/dao/BaseHapiFhirResourceDao.java | 6 +-
.../fhir/jpa/dao/BaseHapiFhirSystemDao.java | 2 +-
.../dao/expunge/ResourceExpungeService.java | 69 ++++++++++---------
.../delete/job/DeleteExpungeProcessor.java | 14 ++--
hapi-fhir-jpaserver-cql/pom.xml | 2 +-
hapi-fhir-jpaserver-mdm/pom.xml | 2 +-
hapi-fhir-jpaserver-model/pom.xml | 2 +-
hapi-fhir-jpaserver-searchparam/pom.xml | 2 +-
hapi-fhir-jpaserver-subscription/pom.xml | 2 +-
hapi-fhir-jpaserver-test-utilities/pom.xml | 2 +-
.../fhir/jpa/dao/expunge/ExpungeHookTest.java | 7 +-
.../jpa/dao/expunge/PartitionRunnerTest.java | 33 ++++-----
hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 2 +-
hapi-fhir-server-mdm/pom.xml | 2 +-
hapi-fhir-server-openapi/pom.xml | 2 +-
hapi-fhir-server/pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../hapi-fhir-spring-boot-samples/pom.xml | 2 +-
.../hapi-fhir-spring-boot-starter/pom.xml | 2 +-
hapi-fhir-spring-boot/pom.xml | 2 +-
hapi-fhir-sql-migrate/pom.xml | 2 +-
hapi-fhir-storage-batch2-jobs/pom.xml | 2 +-
hapi-fhir-storage-batch2/pom.xml | 2 +-
hapi-fhir-storage-test-utilities/pom.xml | 2 +-
hapi-fhir-storage/pom.xml | 2 +-
.../jpa/dao/expunge/ExpungeOperation.java | 25 ++++---
.../fhir/jpa/dao/expunge/ExpungeService.java | 15 ++--
.../dao/expunge/IResourceExpungeService.java | 13 ++--
.../fhir/jpa/dao/expunge/PartitionRunner.java | 9 +--
hapi-fhir-structures-dstu2.1/pom.xml | 2 +-
hapi-fhir-structures-dstu2/pom.xml | 2 +-
hapi-fhir-structures-dstu3/pom.xml | 2 +-
hapi-fhir-structures-hl7org-dstu2/pom.xml | 2 +-
hapi-fhir-structures-r4/pom.xml | 2 +-
hapi-fhir-structures-r5/pom.xml | 2 +-
hapi-fhir-test-utilities/pom.xml | 2 +-
hapi-fhir-testpage-overlay/pom.xml | 2 +-
.../pom.xml | 2 +-
hapi-fhir-validation-resources-dstu2/pom.xml | 2 +-
hapi-fhir-validation-resources-dstu3/pom.xml | 2 +-
hapi-fhir-validation-resources-r4/pom.xml | 2 +-
hapi-fhir-validation-resources-r5/pom.xml | 2 +-
hapi-fhir-validation/pom.xml | 2 +-
hapi-tinder-plugin/pom.xml | 16 ++---
hapi-tinder-test/pom.xml | 2 +-
pom.xml | 4 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
75 files changed, 185 insertions(+), 169 deletions(-)
create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_0_0/3550-expunge-resource-ids.yaml
diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml
index da68153960c..1f6283e42eb 100644
--- a/hapi-deployable-pom/pom.xml
+++ b/hapi-deployable-pom/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml
index 87e1a34e732..e728513cf5d 100644
--- a/hapi-fhir-android/pom.xml
+++ b/hapi-fhir-android/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index 33f1131d643..12541db1d21 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-batch/pom.xml b/hapi-fhir-batch/pom.xml
index 2772d9bc7df..cd12870889f 100644
--- a/hapi-fhir-batch/pom.xml
+++ b/hapi-fhir-batch/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml
index 56570535d76..0937374a1b3 100644
--- a/hapi-fhir-bom/pom.xml
+++ b/hapi-fhir-bom/pom.xml
@@ -3,14 +3,14 @@
4.0.0
ca.uhn.hapi.fhir
hapi-fhir-bom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
pom
HAPI FHIR BOM
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-checkstyle/pom.xml b/hapi-fhir-checkstyle/pom.xml
index b4e608a18b8..a572d772e1e 100644
--- a/hapi-fhir-checkstyle/pom.xml
+++ b/hapi-fhir-checkstyle/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
index e5baefcefcc..3d791fc6be4 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
index 8ba8d4ec4fe..0b222d13362 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir-cli
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
index f960b2aaf83..5eaab66009d 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../../hapi-deployable-pom
diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml
index ac947055ef7..5b5505ea43f 100644
--- a/hapi-fhir-cli/pom.xml
+++ b/hapi-fhir-cli/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml
index 9b6f9c2afd9..fa8e3c0bcb6 100644
--- a/hapi-fhir-client-okhttp/pom.xml
+++ b/hapi-fhir-client-okhttp/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml
index 888c2a7351f..88b0e5fc047 100644
--- a/hapi-fhir-client/pom.xml
+++ b/hapi-fhir-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml
index ab42df96803..26c233fef20 100644
--- a/hapi-fhir-converter/pom.xml
+++ b/hapi-fhir-converter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml
index c91ddfa728a..5a02c48acac 100644
--- a/hapi-fhir-dist/pom.xml
+++ b/hapi-fhir-dist/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml
index 63aaa6b1269..dbb23d915ec 100644
--- a/hapi-fhir-docs/pom.xml
+++ b/hapi-fhir-docs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_0_0/3550-expunge-resource-ids.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_0_0/3550-expunge-resource-ids.yaml
new file mode 100644
index 00000000000..ecb2af8457a
--- /dev/null
+++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_0_0/3550-expunge-resource-ids.yaml
@@ -0,0 +1,5 @@
+---
+type: change
+issue: 3550
+title: "Method signatures on several interfaces and classes related to the `$expunge` operation have changed to support
+the case where the primary identifier of a resource is not necessarily a `Long`."
diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml
index 435cd28f21b..6153ba59a83 100644
--- a/hapi-fhir-jacoco/pom.xml
+++ b/hapi-fhir-jacoco/pom.xml
@@ -11,7 +11,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml
index 5334eefc48c..acd41264e5c 100644
--- a/hapi-fhir-jaxrsserver-base/pom.xml
+++ b/hapi-fhir-jaxrsserver-base/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml
index d265bab29ec..60a9ffc079a 100644
--- a/hapi-fhir-jpa/pom.xml
+++ b/hapi-fhir-jpa/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml
index 2a85b3162cb..f2d42464820 100644
--- a/hapi-fhir-jpaserver-base/pom.xml
+++ b/hapi-fhir-jpaserver-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmLinkDeleter.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmLinkDeleter.java
index 8cbc47eb5ad..d4276f2d8a7 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmLinkDeleter.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/batch/mdm/job/MdmLinkDeleter.java
@@ -25,11 +25,11 @@ import ca.uhn.fhir.jpa.dao.data.IMdmLinkDao;
import ca.uhn.fhir.jpa.dao.expunge.PartitionRunner;
import ca.uhn.fhir.jpa.entity.MdmLink;
import ca.uhn.fhir.mdm.api.MdmMatchResultEnum;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.SliceImpl;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.support.TransactionTemplate;
@@ -58,14 +58,14 @@ public class MdmLinkDeleter implements ItemProcessor, List> {
public List process(List thePidList) throws Exception {
ConcurrentLinkedQueue goldenPidAggregator = new ConcurrentLinkedQueue<>();
PartitionRunner partitionRunner = new PartitionRunner(PROCESS_NAME, THREAD_PREFIX, myDaoConfig.getReindexBatchSize(), myDaoConfig.getReindexThreadCount());
- partitionRunner.runInPartitionedThreads(thePidList, pids -> removeLinks(pids, goldenPidAggregator));
+ partitionRunner.runInPartitionedThreads(ResourcePersistentId.fromLongList(thePidList), pids -> removeLinks(pids, goldenPidAggregator));
return new ArrayList<>(goldenPidAggregator);
}
- private void removeLinks(List pidList, ConcurrentLinkedQueue theGoldenPidAggregator) {
+ private void removeLinks(List pidList, ConcurrentLinkedQueue theGoldenPidAggregator) {
TransactionTemplate txTemplate = new TransactionTemplate(myTxManager);
- txTemplate.executeWithoutResult(t -> theGoldenPidAggregator.addAll(deleteMdmLinksAndReturnGoldenResourcePids(pidList)));
+ txTemplate.executeWithoutResult(t -> theGoldenPidAggregator.addAll(deleteMdmLinksAndReturnGoldenResourcePids(ResourcePersistentId.toLongList(pidList))));
}
public List deleteMdmLinksAndReturnGoldenResourcePids(List thePids) {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java
index 2ac5897623e..b1f5f45caaf 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java
@@ -139,6 +139,7 @@ import ca.uhn.fhir.jpa.validation.ValidationSettings;
import ca.uhn.fhir.mdm.api.IMdmClearJobSubmitter;
import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.rest.api.server.storage.IDeleteExpungeJobSubmitter;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.rest.server.interceptor.ResponseTerminologyTranslationInterceptor;
import ca.uhn.fhir.rest.server.interceptor.consent.IConsentContextServices;
import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor;
@@ -757,8 +758,8 @@ public class JpaConfig {
@Bean
@Scope("prototype")
- public ExpungeOperation expungeOperation(String theResourceName, Long theResourceId, Long theVersion, ExpungeOptions theExpungeOptions, RequestDetails theRequestDetails) {
- return new ExpungeOperation(theResourceName, theResourceId, theVersion, theExpungeOptions, theRequestDetails);
+ public ExpungeOperation expungeOperation(String theResourceName, ResourcePersistentId theResourceId, ExpungeOptions theExpungeOptions, RequestDetails theRequestDetails) {
+ return new ExpungeOperation(theResourceName, theResourceId, theExpungeOptions, theRequestDetails);
}
@Bean
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java
index 42a03498c58..93c5773148c 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java
@@ -77,6 +77,7 @@ import ca.uhn.fhir.rest.api.InterceptorInvocationTimingEnum;
import ca.uhn.fhir.rest.api.RestOperationTypeEnum;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.api.server.RequestDetails;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.rest.api.server.storage.TransactionDetails;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -1422,7 +1423,7 @@ public abstract class BaseHapiFhirDao extends BaseStora
*/
if (thePerformIndexing) {
if (newParams == null) {
- myExpungeService.deleteAllSearchParams(entity.getId());
+ myExpungeService.deleteAllSearchParams(new ResourcePersistentId(entity.getId()));
} else {
// Synchronize search param indexes
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java
index 93251bc5545..5df82595a5f 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java
@@ -887,10 +887,10 @@ public abstract class BaseHapiFhirResourceDao extends B
throw new PreconditionFailedException(Msg.code(969) + "Can not perform version-specific expunge of resource " + theId.toUnqualified().getValue() + " as this is the current version");
}
- return myExpungeService.expunge(getResourceName(), entity.getResourceId(), entity.getVersion(), theExpungeOptions, theRequest);
+ return myExpungeService.expunge(getResourceName(), new ResourcePersistentId(entity.getResourceId(), entity.getVersion()), theExpungeOptions, theRequest);
}
- return myExpungeService.expunge(getResourceName(), entity.getResourceId(), null, theExpungeOptions, theRequest);
+ return myExpungeService.expunge(getResourceName(), new ResourcePersistentId(entity.getResourceId()), theExpungeOptions, theRequest);
}
@Override
@@ -898,7 +898,7 @@ public abstract class BaseHapiFhirResourceDao extends B
public ExpungeOutcome expunge(ExpungeOptions theExpungeOptions, RequestDetails theRequestDetails) {
ourLog.info("Beginning TYPE[{}] expunge operation", getResourceName());
- return myExpungeService.expunge(getResourceName(), null, null, theExpungeOptions, theRequestDetails);
+ return myExpungeService.expunge(getResourceName(), null, theExpungeOptions, theRequestDetails);
}
@Override
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java
index 8728257119f..5ec1396e7e1 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java
@@ -83,7 +83,7 @@ public abstract class BaseHapiFhirSystemDao extends B
@Override
@Transactional(propagation = Propagation.NEVER)
public ExpungeOutcome expunge(ExpungeOptions theExpungeOptions, RequestDetails theRequestDetails) {
- return myExpungeService.expunge(null, null, null, theExpungeOptions, theRequestDetails);
+ return myExpungeService.expunge(null, null, theExpungeOptions, theRequestDetails);
}
@Transactional(propagation = Propagation.REQUIRED)
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ResourceExpungeService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ResourceExpungeService.java
index 5a1c0b09208..17ddf220008 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ResourceExpungeService.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ResourceExpungeService.java
@@ -48,6 +48,7 @@ import ca.uhn.fhir.jpa.dao.data.ISearchParamPresentDao;
import ca.uhn.fhir.jpa.model.entity.ForcedId;
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster;
import ca.uhn.fhir.jpa.util.MemoryCacheService;
import ca.uhn.fhir.model.primitive.IdDt;
@@ -125,15 +126,15 @@ public class ResourceExpungeService implements IResourceExpungeService {
@Override
@Transactional
- public List findHistoricalVersionsOfNonDeletedResources(String theResourceName, Long theResourceId, Long theVersion, int theRemainingCount) {
+ public List findHistoricalVersionsOfNonDeletedResources(String theResourceName, ResourcePersistentId theResourceId, int theRemainingCount) {
Pageable page = PageRequest.of(0, theRemainingCount);
Slice ids;
- if (theResourceId != null) {
- if (theVersion != null) {
- ids = toSlice(myResourceHistoryTableDao.findForIdAndVersionAndFetchProvenance(theResourceId, theVersion));
+ if (theResourceId != null && theResourceId.getId() != null) {
+ if (theResourceId.getVersion() != null) {
+ ids = toSlice(myResourceHistoryTableDao.findForIdAndVersionAndFetchProvenance(theResourceId.getIdAsLong(), theResourceId.getVersion()));
} else {
- ids = myResourceHistoryTableDao.findIdsOfPreviousVersionsOfResourceId(page, theResourceId);
+ ids = myResourceHistoryTableDao.findIdsOfPreviousVersionsOfResourceId(page, theResourceId.getIdAsLong());
}
} else {
if (theResourceName != null) {
@@ -143,16 +144,16 @@ public class ResourceExpungeService implements IResourceExpungeService {
}
}
- return ids.getContent();
+ return ResourcePersistentId.fromLongList(ids.getContent());
}
@Override
@Transactional
- public List findHistoricalVersionsOfDeletedResources(String theResourceName, Long theResourceId, int theRemainingCount) {
+ public List findHistoricalVersionsOfDeletedResources(String theResourceName, ResourcePersistentId theResourceId, int theRemainingCount) {
Pageable page = PageRequest.of(0, theRemainingCount);
Slice ids;
if (theResourceId != null) {
- ids = myResourceTableDao.findIdsOfDeletedResourcesOfType(page, theResourceId, theResourceName);
+ ids = myResourceTableDao.findIdsOfDeletedResourcesOfType(page, theResourceId.getIdAsLong(), theResourceName);
ourLog.info("Expunging {} deleted resources of type[{}] and ID[{}]", ids.getNumberOfElements(), theResourceName, theResourceId);
} else {
if (theResourceName != null) {
@@ -163,14 +164,14 @@ public class ResourceExpungeService implements IResourceExpungeService {
ourLog.info("Expunging {} deleted resources (all types)", ids.getNumberOfElements());
}
}
- return ids.getContent();
+ return ResourcePersistentId.fromLongList(ids.getContent());
}
@Override
@Transactional
- public void expungeCurrentVersionOfResources(RequestDetails theRequestDetails, List theResourceIds, AtomicInteger theRemainingCount) {
- for (Long next : theResourceIds) {
- expungeCurrentVersionOfResource(theRequestDetails, next, theRemainingCount);
+ public void expungeCurrentVersionOfResources(RequestDetails theRequestDetails, List theResourceIds, AtomicInteger theRemainingCount) {
+ for (ResourcePersistentId next : theResourceIds) {
+ expungeCurrentVersionOfResource(theRequestDetails, next.getIdAsLong(), theRemainingCount);
if (theRemainingCount.get() <= 0) {
return;
}
@@ -226,9 +227,9 @@ public class ResourceExpungeService implements IResourceExpungeService {
@Override
@Transactional
- public void expungeHistoricalVersionsOfIds(RequestDetails theRequestDetails, List theResourceIds, AtomicInteger theRemainingCount) {
- for (Long next : theResourceIds) {
- expungeHistoricalVersionsOfId(theRequestDetails, next, theRemainingCount);
+ public void expungeHistoricalVersionsOfIds(RequestDetails theRequestDetails, List theResourceIds, AtomicInteger theRemainingCount) {
+ for (ResourcePersistentId next : theResourceIds) {
+ expungeHistoricalVersionsOfId(theRequestDetails, next.getIdAsLong(), theRemainingCount);
if (theRemainingCount.get() <= 0) {
return;
}
@@ -237,9 +238,9 @@ public class ResourceExpungeService implements IResourceExpungeService {
@Override
@Transactional
- public void expungeHistoricalVersions(RequestDetails theRequestDetails, List theHistoricalIds, AtomicInteger theRemainingCount) {
- for (Long next : theHistoricalIds) {
- expungeHistoricalVersion(theRequestDetails, next, theRemainingCount);
+ public void expungeHistoricalVersions(RequestDetails theRequestDetails, List theHistoricalIds, AtomicInteger theRemainingCount) {
+ for (ResourcePersistentId next : theHistoricalIds) {
+ expungeHistoricalVersion(theRequestDetails, next.getIdAsLong(), theRemainingCount);
if (theRemainingCount.get() <= 0) {
return;
}
@@ -256,7 +257,7 @@ public class ResourceExpungeService implements IResourceExpungeService {
ourLog.info("Expunging current version of resource {}", resource.getIdDt().getValue());
- deleteAllSearchParams(resource.getResourceId());
+ deleteAllSearchParams(new ResourcePersistentId(resource.getResourceId()));
resource.getTags().clear();
if (resource.getForcedId() != null) {
@@ -271,48 +272,48 @@ public class ResourceExpungeService implements IResourceExpungeService {
@Override
@Transactional
- public void deleteAllSearchParams(Long theResourceId) {
- ResourceTable resource = myResourceTableDao.findById(theResourceId).orElse(null);
+ public void deleteAllSearchParams(ResourcePersistentId theResourceId) {
+ ResourceTable resource = myResourceTableDao.findById(theResourceId.getIdAsLong()).orElse(null);
if (resource == null || resource.isParamsUriPopulated()) {
- myResourceIndexedSearchParamUriDao.deleteByResourceId(theResourceId);
+ myResourceIndexedSearchParamUriDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isParamsCoordsPopulated()) {
- myResourceIndexedSearchParamCoordsDao.deleteByResourceId(theResourceId);
+ myResourceIndexedSearchParamCoordsDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isParamsDatePopulated()) {
- myResourceIndexedSearchParamDateDao.deleteByResourceId(theResourceId);
+ myResourceIndexedSearchParamDateDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isParamsNumberPopulated()) {
- myResourceIndexedSearchParamNumberDao.deleteByResourceId(theResourceId);
+ myResourceIndexedSearchParamNumberDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isParamsQuantityPopulated()) {
- myResourceIndexedSearchParamQuantityDao.deleteByResourceId(theResourceId);
+ myResourceIndexedSearchParamQuantityDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isParamsQuantityNormalizedPopulated()) {
- myResourceIndexedSearchParamQuantityNormalizedDao.deleteByResourceId(theResourceId);
+ myResourceIndexedSearchParamQuantityNormalizedDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isParamsStringPopulated()) {
- myResourceIndexedSearchParamStringDao.deleteByResourceId(theResourceId);
+ myResourceIndexedSearchParamStringDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isParamsTokenPopulated()) {
- myResourceIndexedSearchParamTokenDao.deleteByResourceId(theResourceId);
+ myResourceIndexedSearchParamTokenDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isParamsComboStringUniquePresent()) {
- myResourceIndexedCompositeStringUniqueDao.deleteByResourceId(theResourceId);
+ myResourceIndexedCompositeStringUniqueDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isParamsComboTokensNonUniquePresent()) {
- myResourceIndexedComboTokensNonUniqueDao.deleteByResourceId(theResourceId);
+ myResourceIndexedComboTokensNonUniqueDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (myDaoConfig.getIndexMissingFields() == DaoConfig.IndexEnabledEnum.ENABLED) {
- mySearchParamPresentDao.deleteByResourceId(theResourceId);
+ mySearchParamPresentDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isHasLinks()) {
- myResourceLinkDao.deleteByResourceId(theResourceId);
+ myResourceLinkDao.deleteByResourceId(theResourceId.getIdAsLong());
}
if (resource == null || resource.isHasTags()) {
- myResourceTagDao.deleteByResourceId(theResourceId);
+ myResourceTagDao.deleteByResourceId(theResourceId.getIdAsLong());
}
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeProcessor.java
index 16ba8832fb3..11131fe1e9b 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeProcessor.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeProcessor.java
@@ -28,6 +28,7 @@ import ca.uhn.fhir.jpa.dao.expunge.ResourceForeignKey;
import ca.uhn.fhir.jpa.dao.expunge.ResourceTableFKProvider;
import ca.uhn.fhir.jpa.dao.index.IJpaIdHelperService;
import ca.uhn.fhir.jpa.model.entity.ResourceLink;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -84,10 +85,11 @@ public class DeleteExpungeProcessor implements ItemProcessor, List targetPidsAsResourceIds = ResourcePersistentId.fromLongList(thePids);
List conflictResourceLinks = Collections.synchronizedList(new ArrayList<>());
PartitionRunner partitionRunner = new PartitionRunner(PROCESS_NAME, THREAD_PREFIX, myDaoConfig.getExpungeBatchSize(), myDaoConfig.getExpungeThreadCount());
- Consumer> listConsumer = someTargetPids -> findResourceLinksWithTargetPidIn(thePids, someTargetPids, conflictResourceLinks);
- partitionRunner.runInPartitionedThreads(thePids, listConsumer);
+ Consumer> listConsumer = someTargetPids -> findResourceLinksWithTargetPidIn(targetPidsAsResourceIds, someTargetPids, conflictResourceLinks);
+ partitionRunner.runInPartitionedThreads(targetPidsAsResourceIds, listConsumer);
if (conflictResourceLinks.isEmpty()) {
return;
@@ -105,14 +107,16 @@ public class DeleteExpungeProcessor implements ItemProcessor, List theAllTargetPids, List theSomeTargetPids, List theConflictResourceLinks) {
+ public void findResourceLinksWithTargetPidIn(List theAllTargetPids, List theSomeTargetPids, List theConflictResourceLinks) {
+ List allTargetPidsAsLongs = ResourcePersistentId.toLongList(theAllTargetPids);
+ List someTargetPidsAsLongs = ResourcePersistentId.toLongList(theSomeTargetPids);
// We only need to find one conflict, so if we found one already in an earlier partition run, we can skip the rest of the searches
if (theConflictResourceLinks.isEmpty()) {
- List conflictResourceLinks = myResourceLinkDao.findWithTargetPidIn(theSomeTargetPids).stream()
+ List conflictResourceLinks = myResourceLinkDao.findWithTargetPidIn(someTargetPidsAsLongs).stream()
// Filter out resource links for which we are planning to delete the source.
// theAllTargetPids contains a list of all the pids we are planning to delete. So we only want
// to consider a link to be a conflict if the source of that link is not in theAllTargetPids.
- .filter(link -> !theAllTargetPids.contains(link.getSourceResourcePid()))
+ .filter(link -> !allTargetPidsAsLongs.contains(link.getSourceResourcePid()))
.collect(Collectors.toList());
// We do this in two steps to avoid lock contention on this synchronized list
diff --git a/hapi-fhir-jpaserver-cql/pom.xml b/hapi-fhir-jpaserver-cql/pom.xml
index 55b69f1d85b..ad42f7dd0e5 100644
--- a/hapi-fhir-jpaserver-cql/pom.xml
+++ b/hapi-fhir-jpaserver-cql/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml
index 3ba02805b62..12390718998 100644
--- a/hapi-fhir-jpaserver-mdm/pom.xml
+++ b/hapi-fhir-jpaserver-mdm/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml
index 1af24e1adad..4700cbb4ed0 100644
--- a/hapi-fhir-jpaserver-model/pom.xml
+++ b/hapi-fhir-jpaserver-model/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml
index fd7db5ee903..7016d0e03f0 100755
--- a/hapi-fhir-jpaserver-searchparam/pom.xml
+++ b/hapi-fhir-jpaserver-searchparam/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml
index 3b9c200a3a8..e1361879e89 100644
--- a/hapi-fhir-jpaserver-subscription/pom.xml
+++ b/hapi-fhir-jpaserver-subscription/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml
index 46553669c4f..970a27688e3 100644
--- a/hapi-fhir-jpaserver-test-utilities/pom.xml
+++ b/hapi-fhir-jpaserver-test-utilities/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java
index 6f04d934eb1..5d91d330155 100644
--- a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java
+++ b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java
@@ -7,6 +7,7 @@ import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoPatient;
import ca.uhn.fhir.jpa.api.model.ExpungeOptions;
import ca.uhn.fhir.jpa.test.BaseJpaDstu3Test;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
import ca.uhn.test.concurrency.PointcutLatch;
import org.hl7.fhir.dstu3.model.Patient;
@@ -61,7 +62,7 @@ public class ExpungeHookTest extends BaseJpaDstu3Test {
myEverythingLatch.setExpectedCount(1);
ExpungeOptions options = new ExpungeOptions();
options.setExpungeEverything(true);
- myExpungeService.expunge(null, null, null, options, null);
+ myExpungeService.expunge(null, null, options, null);
myEverythingLatch.awaitExpected();
assertPatientGone(id);
@@ -94,7 +95,7 @@ public class ExpungeHookTest extends BaseJpaDstu3Test {
// Expunge everything with the service.
myEverythingLatch.setExpectedCount(1);
- myExpungeService.expunge(null, null, null, options, mySrd);
+ myExpungeService.expunge(null, null, options, mySrd);
myEverythingLatch.awaitExpected();
assertPatientGone(id);
@@ -122,7 +123,7 @@ public class ExpungeHookTest extends BaseJpaDstu3Test {
options.setExpungeDeletedResources(true);
myExpungeResourceLatch.setExpectedCount(2);
- myExpungeService.expunge("Patient", expungeId.getIdPartAsLong(), null, options, null);
+ myExpungeService.expunge("Patient", new ResourcePersistentId(expungeId.getIdPartAsLong()), options, null);
HookParams hookParams = myExpungeResourceLatch.awaitExpected().get(0);
IIdType hookId = hookParams.get(IIdType.class);
diff --git a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunnerTest.java b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunnerTest.java
index e92d43b95ee..3e5b1d26884 100644
--- a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunnerTest.java
+++ b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunnerTest.java
@@ -2,6 +2,7 @@ package ca.uhn.fhir.jpa.dao.expunge;
import ca.uhn.fhir.interceptor.api.HookParams;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.test.concurrency.PointcutLatch;
import com.google.common.collect.Sets;
import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -34,8 +35,8 @@ public class PartitionRunnerTest {
@Test
public void emptyList() {
- List resourceIds = buildPidList(0);
- Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
+ List resourceIds = buildPidList(0);
+ Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
myLatch.setExpectedCount(0);
getPartitionRunner().runInPartitionedThreads(resourceIds, partitionConsumer);
@@ -54,19 +55,19 @@ public class PartitionRunnerTest {
return new PartitionRunner("TEST", "test", theBatchSize, theThreadCount);
}
- private List buildPidList(int size) {
- List list = new ArrayList<>();
+ private List buildPidList(int size) {
+ List list = new ArrayList<>();
for (long i = 0; i < size; ++i) {
- list.add(i + 1);
+ list.add(new ResourcePersistentId(i + 1));
}
return list;
}
@Test
public void oneItem() throws InterruptedException {
- List resourceIds = buildPidList(1);
+ List resourceIds = buildPidList(1);
- Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
+ Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
myLatch.setExpectedCount(1);
getPartitionRunner().runInPartitionedThreads(resourceIds, partitionConsumer);
PartitionCall partitionCall = (PartitionCall) PointcutLatch.getLatchInvocationParameter(myLatch.awaitExpected());
@@ -77,9 +78,9 @@ public class PartitionRunnerTest {
@Test
public void twoItems() throws InterruptedException {
- List resourceIds = buildPidList(2);
+ List resourceIds = buildPidList(2);
- Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
+ Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
myLatch.setExpectedCount(1);
getPartitionRunner().runInPartitionedThreads(resourceIds, partitionConsumer);
PartitionCall partitionCall = (PartitionCall) PointcutLatch.getLatchInvocationParameter(myLatch.awaitExpected());
@@ -89,9 +90,9 @@ public class PartitionRunnerTest {
@Test
public void tenItemsBatch5() throws InterruptedException {
- List resourceIds = buildPidList(10);
+ List resourceIds = buildPidList(10);
- Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
+ Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
myLatch.setExpectedCount(2);
getPartitionRunner(5).runInPartitionedThreads(resourceIds, partitionConsumer);
List calls = myLatch.awaitExpected();
@@ -106,13 +107,13 @@ public class PartitionRunnerTest {
@Test
public void nineItemsBatch5() throws InterruptedException {
- List resourceIds = buildPidList(9);
+ List resourceIds = buildPidList(9);
// We don't care in which order, but one partition size should be
// 5 and one should be 4
Set nums = Sets.newHashSet(5, 4);
- Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
+ Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
myLatch.setExpectedCount(2);
getPartitionRunner(5).runInPartitionedThreads(resourceIds, partitionConsumer);
List calls = myLatch.awaitExpected();
@@ -127,9 +128,9 @@ public class PartitionRunnerTest {
@Test
public void tenItemsOneThread() throws InterruptedException {
- List resourceIds = buildPidList(10);
+ List resourceIds = buildPidList(10);
- Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
+ Consumer> partitionConsumer = buildPartitionConsumer(myLatch);
myLatch.setExpectedCount(2);
getPartitionRunner(5, 1).runInPartitionedThreads(resourceIds, partitionConsumer);
List calls = myLatch.awaitExpected();
@@ -145,7 +146,7 @@ public class PartitionRunnerTest {
}
}
- private Consumer> buildPartitionConsumer(PointcutLatch latch) {
+ private Consumer> buildPartitionConsumer(PointcutLatch latch) {
return list -> latch.call(new PartitionCall(Thread.currentThread().getName(), list.size()));
}
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
index d14b2441926..5d42c8943c4 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
+++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml
index 953e9979ebf..6b6b198cd22 100644
--- a/hapi-fhir-server-mdm/pom.xml
+++ b/hapi-fhir-server-mdm/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml
index 84bd20d691f..cdea4a51207 100644
--- a/hapi-fhir-server-openapi/pom.xml
+++ b/hapi-fhir-server-openapi/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml
index e0fcd4bad9a..bd56234c0a4 100644
--- a/hapi-fhir-server/pom.xml
+++ b/hapi-fhir-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
index 156612065f4..ea1527d1c8d 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
index d7e02a72215..6a8c0b9ef8f 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
hapi-fhir-spring-boot-sample-client-apache
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
index b958bf16589..2ce583017ce 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
hapi-fhir-spring-boot-sample-client-okhttp
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
index 8c9d210c4ac..7307ef0d53d 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
hapi-fhir-spring-boot-sample-server-jersey
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
index 495255f0e32..33e8ae4f128 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
hapi-fhir-spring-boot-samples
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
index eacf28a7391..416163e3b72 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml
index bc2ec54701b..a7f587655aa 100644
--- a/hapi-fhir-spring-boot/pom.xml
+++ b/hapi-fhir-spring-boot/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml
index 146e2a10aee..15cee878943 100644
--- a/hapi-fhir-sql-migrate/pom.xml
+++ b/hapi-fhir-sql-migrate/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2-jobs/pom.xml b/hapi-fhir-storage-batch2-jobs/pom.xml
index f06eeae2dcd..ce914180030 100644
--- a/hapi-fhir-storage-batch2-jobs/pom.xml
+++ b/hapi-fhir-storage-batch2-jobs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-storage-batch2/pom.xml b/hapi-fhir-storage-batch2/pom.xml
index 209422bcedb..4db3653d1f8 100644
--- a/hapi-fhir-storage-batch2/pom.xml
+++ b/hapi-fhir-storage-batch2/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-test-utilities/pom.xml b/hapi-fhir-storage-test-utilities/pom.xml
index 5b8238bc2b3..9ef53b0a125 100644
--- a/hapi-fhir-storage-test-utilities/pom.xml
+++ b/hapi-fhir-storage-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml
index 4f5cf3b479f..592517846c7 100644
--- a/hapi-fhir-storage/pom.xml
+++ b/hapi-fhir-storage/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeOperation.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeOperation.java
index fbe97ccdb2a..e8b88d1004c 100644
--- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeOperation.java
+++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeOperation.java
@@ -24,6 +24,7 @@ import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.model.ExpungeOptions;
import ca.uhn.fhir.jpa.api.model.ExpungeOutcome;
import ca.uhn.fhir.rest.api.server.RequestDetails;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -47,16 +48,14 @@ public class ExpungeOperation implements Callable {
private DaoConfig myDaoConfig;
private final String myResourceName;
- private final Long myResourceId;
- private final Long myVersion;
+ private final ResourcePersistentId myResourceId;
private final ExpungeOptions myExpungeOptions;
private final RequestDetails myRequestDetails;
private final AtomicInteger myRemainingCount;
- public ExpungeOperation(String theResourceName, Long theResourceId, Long theVersion, ExpungeOptions theExpungeOptions, RequestDetails theRequestDetails) {
+ public ExpungeOperation(String theResourceName, ResourcePersistentId theResourceId, ExpungeOptions theExpungeOptions, RequestDetails theRequestDetails) {
myResourceName = theResourceName;
myResourceId = theResourceId;
- myVersion = theVersion;
myExpungeOptions = theExpungeOptions;
myRequestDetails = theRequestDetails;
myRemainingCount = new AtomicInteger(myExpungeOptions.getLimit());
@@ -64,7 +63,7 @@ public class ExpungeOperation implements Callable {
@Override
public ExpungeOutcome call() {
- if (myExpungeOptions.isExpungeDeletedResources() && myVersion == null) {
+ if (myExpungeOptions.isExpungeDeletedResources() && (myResourceId == null || myResourceId.getVersion() == null)) {
expungeDeletedResources();
if (expungeLimitReached()) {
return expungeOutcome();
@@ -82,7 +81,7 @@ public class ExpungeOperation implements Callable {
}
private void expungeDeletedResources() {
- List resourceIds = findHistoricalVersionsOfDeletedResources();
+ List resourceIds = findHistoricalVersionsOfDeletedResources();
deleteHistoricalVersions(resourceIds);
if (expungeLimitReached()) {
@@ -92,14 +91,14 @@ public class ExpungeOperation implements Callable {
deleteCurrentVersionsOfDeletedResources(resourceIds);
}
- private List findHistoricalVersionsOfDeletedResources() {
- List retVal = myExpungeDaoService.findHistoricalVersionsOfDeletedResources(myResourceName, myResourceId, myRemainingCount.get());
+ private List findHistoricalVersionsOfDeletedResources() {
+ List retVal = myExpungeDaoService.findHistoricalVersionsOfDeletedResources(myResourceName, myResourceId, myRemainingCount.get());
ourLog.debug("Found {} historical versions", retVal.size());
return retVal;
}
- private List findHistoricalVersionsOfNonDeletedResources() {
- return myExpungeDaoService.findHistoricalVersionsOfNonDeletedResources(myResourceName, myResourceId, myVersion, myRemainingCount.get());
+ private List findHistoricalVersionsOfNonDeletedResources() {
+ return myExpungeDaoService.findHistoricalVersionsOfNonDeletedResources(myResourceName, myResourceId, myRemainingCount.get());
}
private boolean expungeLimitReached() {
@@ -111,7 +110,7 @@ public class ExpungeOperation implements Callable {
}
private void expungeOldVersions() {
- List historicalIds = findHistoricalVersionsOfNonDeletedResources();
+ List historicalIds = findHistoricalVersionsOfNonDeletedResources();
getPartitionRunner().runInPartitionedThreads(historicalIds, partition -> myExpungeDaoService.expungeHistoricalVersions(myRequestDetails, partition, myRemainingCount));
}
@@ -120,11 +119,11 @@ public class ExpungeOperation implements Callable {
return new PartitionRunner(PROCESS_NAME, THREAD_PREFIX, myDaoConfig.getExpungeBatchSize(), myDaoConfig.getExpungeThreadCount());
}
- private void deleteCurrentVersionsOfDeletedResources(List theResourceIds) {
+ private void deleteCurrentVersionsOfDeletedResources(List theResourceIds) {
getPartitionRunner().runInPartitionedThreads(theResourceIds, partition -> myExpungeDaoService.expungeCurrentVersionOfResources(myRequestDetails, partition, myRemainingCount));
}
- private void deleteHistoricalVersions(List theResourceIds) {
+ private void deleteHistoricalVersions(List theResourceIds) {
getPartitionRunner().runInPartitionedThreads(theResourceIds, partition -> myExpungeDaoService.expungeHistoricalVersionsOfIds(myRequestDetails, partition, myRemainingCount));
}
diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeService.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeService.java
index 1d473b2c927..bee468a3ebf 100644
--- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeService.java
+++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeService.java
@@ -24,6 +24,7 @@ import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.api.model.ExpungeOptions;
import ca.uhn.fhir.jpa.api.model.ExpungeOutcome;
import ca.uhn.fhir.rest.api.server.RequestDetails;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -42,28 +43,28 @@ public class ExpungeService {
@Autowired
private ApplicationContext myApplicationContext;
- protected ExpungeOperation getExpungeOperation(String theResourceName, Long theResourceId, Long theVersion, ExpungeOptions theExpungeOptions, RequestDetails theRequestDetails) {
- return myApplicationContext.getBean(ExpungeOperation.class, theResourceName, theResourceId, theVersion, theExpungeOptions, theRequestDetails);
+ protected ExpungeOperation getExpungeOperation(String theResourceName, ResourcePersistentId theResourceId, ExpungeOptions theExpungeOptions, RequestDetails theRequestDetails) {
+ return myApplicationContext.getBean(ExpungeOperation.class, theResourceName, theResourceId, theExpungeOptions, theRequestDetails);
}
- public ExpungeOutcome expunge(String theResourceName, Long theResourceId, Long theVersion, ExpungeOptions theExpungeOptions, RequestDetails theRequest) {
- ourLog.info("Expunge: ResourceName[{}] Id[{}] Version[{}] Options[{}]", theResourceName, theResourceId, theVersion, theExpungeOptions);
+ public ExpungeOutcome expunge(String theResourceName, ResourcePersistentId theResourceId, ExpungeOptions theExpungeOptions, RequestDetails theRequest) {
+ ourLog.info("Expunge: ResourceName[{}] Id[{}] Version[{}] Options[{}]", theResourceName, theResourceId != null ? theResourceId.getId() : null, theResourceId != null ? theResourceId.getVersion() : null, theExpungeOptions);
if (theExpungeOptions.getLimit() < 1) {
throw new InvalidRequestException(Msg.code(1087) + "Expunge limit may not be less than 1. Received expunge limit " + theExpungeOptions.getLimit() + ".");
}
- if (theResourceName == null && theResourceId == null && theVersion == null) {
+ if (theResourceName == null && (theResourceId == null || (theResourceId.getId() == null && theResourceId.getVersion() == null))) {
if (theExpungeOptions.isExpungeEverything()) {
myExpungeEverythingService.expungeEverything(theRequest);
}
}
- ExpungeOperation expungeOperation = getExpungeOperation(theResourceName, theResourceId, theVersion, theExpungeOptions, theRequest);
+ ExpungeOperation expungeOperation = getExpungeOperation(theResourceName, theResourceId, theExpungeOptions, theRequest);
return expungeOperation.call();
}
- public void deleteAllSearchParams(Long theResourceId) {
+ public void deleteAllSearchParams(ResourcePersistentId theResourceId) {
myExpungeDaoService.deleteAllSearchParams(theResourceId);
}
}
diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/IResourceExpungeService.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/IResourceExpungeService.java
index d8d8a6b4213..fe7775a3736 100644
--- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/IResourceExpungeService.java
+++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/IResourceExpungeService.java
@@ -21,20 +21,21 @@ package ca.uhn.fhir.jpa.dao.expunge;
*/
import ca.uhn.fhir.rest.api.server.RequestDetails;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
public interface IResourceExpungeService {
- List findHistoricalVersionsOfDeletedResources(String theResourceName, Long theResourceId, int theI);
+ List findHistoricalVersionsOfDeletedResources(String theResourceName, ResourcePersistentId theResourceId, int theI);
- List findHistoricalVersionsOfNonDeletedResources(String theResourceName, Long theResourceId, Long theVersion, int theI);
+ List findHistoricalVersionsOfNonDeletedResources(String theResourceName, ResourcePersistentId theResourceId, int theI);
- void expungeHistoricalVersions(RequestDetails theRequestDetails, List thePartition, AtomicInteger theRemainingCount);
+ void expungeHistoricalVersions(RequestDetails theRequestDetails, List thePartition, AtomicInteger theRemainingCount);
- void expungeCurrentVersionOfResources(RequestDetails theRequestDetails, List theResourceIds, AtomicInteger theRemainingCount);
+ void expungeCurrentVersionOfResources(RequestDetails theRequestDetails, List theResourceIds, AtomicInteger theRemainingCount);
- void expungeHistoricalVersionsOfIds(RequestDetails theRequestDetails, List theResourceIds, AtomicInteger theRemainingCount);
+ void expungeHistoricalVersionsOfIds(RequestDetails theRequestDetails, List theResourceIds, AtomicInteger theRemainingCount);
- void deleteAllSearchParams(Long theResourceId);
+ void deleteAllSearchParams(ResourcePersistentId theResourceId);
}
diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunner.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunner.java
index 5cca08bb326..ec5574ab6c2 100644
--- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunner.java
+++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunner.java
@@ -21,6 +21,7 @@ package ca.uhn.fhir.jpa.dao.expunge;
*/
import ca.uhn.fhir.i18n.Msg;
+import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.util.StopWatch;
import com.google.common.collect.Lists;
@@ -57,7 +58,7 @@ public class PartitionRunner {
myThreadCount = theThreadCount;
}
- public void runInPartitionedThreads(List theResourceIds, Consumer> partitionConsumer) {
+ public void runInPartitionedThreads(List theResourceIds, Consumer> partitionConsumer) {
List> callableTasks = buildCallableTasks(theResourceIds, partitionConsumer);
if (callableTasks.size() == 0) {
@@ -92,7 +93,7 @@ public class PartitionRunner {
}
}
- private List> buildCallableTasks(List theResourceIds, Consumer> partitionConsumer) {
+ private List> buildCallableTasks(List theResourceIds, Consumer> partitionConsumer) {
List> retval = new ArrayList<>();
if (myBatchSize > theResourceIds.size()) {
@@ -100,9 +101,9 @@ public class PartitionRunner {
} else {
ourLog.info("Creating batch job of {} entries", theResourceIds.size());
}
- List> partitions = Lists.partition(theResourceIds, myBatchSize);
+ List> partitions = Lists.partition(theResourceIds, myBatchSize);
- for (List nextPartition : partitions) {
+ for (List nextPartition : partitions) {
if (nextPartition.size() > 0) {
Callable callableTask = () -> {
ourLog.info(myProcessName + " {} resources", nextPartition.size());
diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml
index 2ffa4be5db1..729b1a08569 100644
--- a/hapi-fhir-structures-dstu2.1/pom.xml
+++ b/hapi-fhir-structures-dstu2.1/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml
index b4c347d03da..0c09e6288ae 100644
--- a/hapi-fhir-structures-dstu2/pom.xml
+++ b/hapi-fhir-structures-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml
index 7e515aa94b8..885d9aca230 100644
--- a/hapi-fhir-structures-dstu3/pom.xml
+++ b/hapi-fhir-structures-dstu3/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml
index 7cb8d1bd89f..c1325cae6b3 100644
--- a/hapi-fhir-structures-hl7org-dstu2/pom.xml
+++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml
index d32002b239b..01d352adb6b 100644
--- a/hapi-fhir-structures-r4/pom.xml
+++ b/hapi-fhir-structures-r4/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml
index dc06844df85..fcab223f3df 100644
--- a/hapi-fhir-structures-r5/pom.xml
+++ b/hapi-fhir-structures-r5/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml
index f349c3d8867..c7254c15dea 100644
--- a/hapi-fhir-test-utilities/pom.xml
+++ b/hapi-fhir-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml
index 0724aa8a34a..8aa8fd04da4 100644
--- a/hapi-fhir-testpage-overlay/pom.xml
+++ b/hapi-fhir-testpage-overlay/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml
index a04333f2928..d72d8a9a44b 100644
--- a/hapi-fhir-validation-resources-dstu2.1/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml
index 40cb90ce17e..1e38a29f587 100644
--- a/hapi-fhir-validation-resources-dstu2/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml
index 69ef0bca7c2..b7ae5129a3a 100644
--- a/hapi-fhir-validation-resources-dstu3/pom.xml
+++ b/hapi-fhir-validation-resources-dstu3/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml
index cd548fb3885..32808d1a31b 100644
--- a/hapi-fhir-validation-resources-r4/pom.xml
+++ b/hapi-fhir-validation-resources-r4/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml
index 36347eb9d0a..41e99538c15 100644
--- a/hapi-fhir-validation-resources-r5/pom.xml
+++ b/hapi-fhir-validation-resources-r5/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml
index dd952554961..a3119bfd2cd 100644
--- a/hapi-fhir-validation/pom.xml
+++ b/hapi-fhir-validation/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml
index 32b1648774d..45f110b5f4b 100644
--- a/hapi-tinder-plugin/pom.xml
+++ b/hapi-tinder-plugin/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../pom.xml
@@ -58,37 +58,37 @@
ca.uhn.hapi.fhir
hapi-fhir-structures-dstu3
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-hl7org-dstu2
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-r4
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-r5
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-dstu2
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-dstu3
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-r4
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
org.apache.velocity
diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml
index 19ba66d4e44..2132c51f01e 100644
--- a/hapi-tinder-test/pom.xml
+++ b/hapi-tinder-test/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index a1f7faf3345..433b2231242 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir
pom
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
HAPI-FHIR
An open-source implementation of the FHIR specification in Java.
https://hapifhir.io
@@ -2015,7 +2015,7 @@
ca.uhn.hapi.fhir
hapi-fhir-checkstyle
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
index 18e5614d0f2..53bfb81e556 100644
--- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
+++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
index c54b8366b2f..550285d4f55 100644
--- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
index 3c393fd4623..2e43704c5a3 100644
--- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.0.0-PRE10-SNAPSHOT
+ 6.0.0-PRE11-SNAPSHOT
../../pom.xml