#5223 Replace service methods with similar entity calls
authorCherian Mathew <c.mathew@bgbm.org>
Fri, 11 Sep 2015 15:36:20 +0000 (17:36 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Fri, 11 Sep 2015 15:36:20 +0000 (17:36 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java

index 4596057aaeb45dccea3852e667f03a7e27dccc47..99a1d883d6fbd9410de57b2b7148bb4edf1e9d6e 100644 (file)
@@ -234,7 +234,7 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
                 if(collection!=null){
                     label += collection.getCode()!=null?"("+collection.getCode()+")"+separator:emptyString;
                 }
-                String mostSignificantIdentifier = CdmStore.getService(IOccurrenceService.class).getMostSignificantIdentifier(derivedUnit);
+                String mostSignificantIdentifier = derivedUnit.getMostSignificantIdentifier();
                 label += mostSignificantIdentifier!=null?mostSignificantIdentifier+separator:emptyString;
             }
             else if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.TissueSample){
@@ -305,7 +305,7 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
             boolean hasCharacterData = false;
             if(cdmBase.isInstanceOf(SpecimenOrObservationBase.class)){
                 SpecimenOrObservationBase<?> specimen = HibernateProxyHelper.deproxy(cdmBase, SpecimenOrObservationBase.class);
-                if(!CdmStore.getService(IOccurrenceService.class).getCharacterDataForSpecimen(specimen.getUuid()).isEmpty()){
+                if(specimen.hasCharacterData()){
                     hasCharacterData = true;
                 }
             }