From 372ef4b6c9465027a2a0d193bcb88a2278178eea Mon Sep 17 00:00:00 2001 From: Jens Kristian Villadsen Date: Wed, 14 Feb 2024 09:28:11 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20added=20`setLoadSynchronousUpTo`=20to=20?= =?UTF-8?q?validation=20searches=20on=20Structu=E2=80=A6=20(#645)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: added `setLoadSynchronousUpTo` to validation searches on StructureDefinition * chore: adjusted to comments --- .../validation/RepositoryValidationInterceptorFactoryDstu3.java | 2 +- .../validation/RepositoryValidationInterceptorFactoryR4.java | 2 +- .../validation/RepositoryValidationInterceptorFactoryR4B.java | 2 +- .../validation/RepositoryValidationInterceptorFactoryR5.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryDstu3.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryDstu3.java index f276b86b5fd..621616c49a3 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryDstu3.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryDstu3.java @@ -47,7 +47,7 @@ public RepositoryValidationInterceptorFactoryDstu3( public RepositoryValidatingInterceptor buildUsingStoredStructureDefinitions() { IBundleProvider results = structureDefinitionResourceProvider.search( - new SearchParameterMap().add(StructureDefinition.SP_KIND, new TokenParam("resource"))); + new SearchParameterMap().setLoadSynchronous(true).add(StructureDefinition.SP_KIND, new TokenParam("resource"))); Map> structureDefinitions = results.getResources(0, results.size()).stream() .map(StructureDefinition.class::cast) .collect(Collectors.groupingBy(StructureDefinition::getType)); diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR4.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR4.java index b7df8b99fb8..0487ae9fbd4 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR4.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR4.java @@ -48,7 +48,7 @@ public RepositoryValidationInterceptorFactoryR4( public RepositoryValidatingInterceptor buildUsingStoredStructureDefinitions() { IBundleProvider results = structureDefinitionResourceProvider.search( - new SearchParameterMap().add(StructureDefinition.SP_KIND, new TokenParam("resource"))); + new SearchParameterMap().setLoadSynchronous(true).add(StructureDefinition.SP_KIND, new TokenParam("resource"))); Map> structureDefintions = results.getResources(0, results.size()).stream() .map(StructureDefinition.class::cast) .collect(Collectors.groupingBy(StructureDefinition::getType)); diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR4B.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR4B.java index 6f6847eb17e..f36bba6eecb 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR4B.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR4B.java @@ -48,7 +48,7 @@ public RepositoryValidationInterceptorFactoryR4B( public RepositoryValidatingInterceptor buildUsingStoredStructureDefinitions() { IBundleProvider results = structureDefinitionResourceProvider.search( - new SearchParameterMap().add(StructureDefinition.SP_KIND, new TokenParam("resource"))); + new SearchParameterMap().setLoadSynchronous(true).add(StructureDefinition.SP_KIND, new TokenParam("resource"))); Map> structureDefintions = results.getResources(0, results.size()).stream() .map(StructureDefinition.class::cast) .collect(Collectors.groupingBy(StructureDefinition::getType)); diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR5.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR5.java index 7f3b38bc8cd..eada48b1f95 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR5.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR5.java @@ -47,7 +47,7 @@ public RepositoryValidationInterceptorFactoryR5( public RepositoryValidatingInterceptor buildUsingStoredStructureDefinitions() { IBundleProvider results = structureDefinitionResourceProvider.search( - new SearchParameterMap().add(StructureDefinition.SP_KIND, new TokenParam("resource"))); + new SearchParameterMap().setLoadSynchronous(true).add(StructureDefinition.SP_KIND, new TokenParam("resource"))); Map> structureDefintions = results.getResources(0, results.size()).stream() .map(StructureDefinition.class::cast) .collect(Collectors.groupingBy(StructureDefinition::getType));