Address review comments.

This commit is contained in:
Diederik Muylwyk 2019-09-03 16:37:28 -04:00
parent 6ebc9572ac
commit 3e522a7414
2 changed files with 3 additions and 6 deletions

View File

@ -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<TermValueSetConcept> 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;

View File

@ -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<Slice<TermValueSetConcept>> loader = () -> myValueSetConceptDao.findByTermValueSetIdAndPreFetchDesignations(SearchCoordinatorSvcImpl.toPage(theOffset, toIndex), theTermValueSet.getId());
Slice<TermValueSetConcept> slice = loader.get();
Slice<TermValueSetConcept> slice = myValueSetConceptDao.findByTermValueSetIdAndPreFetchDesignations(SearchCoordinatorSvcImpl.toPage(theOffset, toIndex), theTermValueSet.getId());
if (!slice.hasContent()) {
logConceptsExpanded(theTermValueSet, conceptsExpanded);
return;