From 3e522a7414bf153d9102f2cab2df439dacd19933 Mon Sep 17 00:00:00 2001 From: Diederik Muylwyk Date: Tue, 3 Sep 2019 16:37:28 -0400 Subject: [PATCH] Address review comments. --- .../src/main/java/ca/uhn/fhir/jpa/entity/TermValueSet.java | 6 ++---- .../ca/uhn/fhir/jpa/term/BaseHapiTerminologySvcImpl.java | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSet.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSet.java index 30bb962f34c..3a694227906 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSet.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermValueSet.java @@ -44,8 +44,6 @@ import static org.apache.commons.lang3.StringUtils.length; public class TermValueSet implements Serializable { private static final long serialVersionUID = 1L; - private static final int MAX_TOTAL_LENGTH = 19; - public static final int MAX_EXPANSION_STATUS_LENGTH = 50; public static final int MAX_NAME_LENGTH = 200; public static final int MAX_URL_LENGTH = 200; @@ -72,11 +70,11 @@ public class TermValueSet implements Serializable { @OneToMany(mappedBy = "myValueSet") private List myConcepts; - @Column(name = "TOTAL_CONCEPTS", nullable = false, length = MAX_TOTAL_LENGTH) + @Column(name = "TOTAL_CONCEPTS", nullable = false) @ColumnDefault("0") private Long myTotalConcepts; - @Column(name = "TOTAL_CONCEPT_DESIGNATIONS", nullable = false, length = MAX_TOTAL_LENGTH) + @Column(name = "TOTAL_CONCEPT_DESIGNATIONS", nullable = false) @ColumnDefault("0") private Long myTotalConceptDesignations; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvcImpl.java index c33a6c3bc57..81398a5dee3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvcImpl.java @@ -541,8 +541,7 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc, private void expandConcepts(ValueSet.ValueSetExpansionComponent theExpansionComponent, TermValueSet theTermValueSet, int theOffset, int theCount) { int conceptsExpanded = 0; int toIndex = theOffset + theCount; - Supplier> loader = () -> myValueSetConceptDao.findByTermValueSetIdAndPreFetchDesignations(SearchCoordinatorSvcImpl.toPage(theOffset, toIndex), theTermValueSet.getId()); - Slice slice = loader.get(); + Slice slice = myValueSetConceptDao.findByTermValueSetIdAndPreFetchDesignations(SearchCoordinatorSvcImpl.toPage(theOffset, toIndex), theTermValueSet.getId()); if (!slice.hasContent()) { logConceptsExpanded(theTermValueSet, conceptsExpanded); return;