Adapt to service changes #5200
authorPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 10 Nov 2015 11:40:14 +0000 (12:40 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 10 Nov 2015 11:40:14 +0000 (12:40 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientOccurenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/DeleteDerivateOperation.java

index 185dfe470d6d5cfd63af911c608f05df05d6fddc..61c2e8cf6d4f379f4732612514628eb4a49cdd0e 100644 (file)
@@ -41,7 +41,6 @@ import eu.etaxonomy.cdm.api.service.search.SearchResult;
 import eu.etaxonomy.cdm.api.service.util.TaxonRelationshipEdge;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
 import eu.etaxonomy.cdm.model.common.Annotation;
 import eu.etaxonomy.cdm.api.service.util.TaxonRelationshipEdge;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
 import eu.etaxonomy.cdm.model.common.Annotation;
-import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.common.ISourceable;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.common.ISourceable;
@@ -58,7 +57,6 @@ import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
 import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
-import eu.etaxonomy.cdm.model.molecular.SingleRead;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
@@ -917,11 +915,6 @@ public class TransientOccurenceService implements IOccurrenceService {
         return defaultService.getNonCascadedAssociatedElements(specimen);
     }
 
         return defaultService.getNonCascadedAssociatedElements(specimen);
     }
 
-    @Override
-    public DeleteResult deleteDerivateHierarchy(CdmBase from, SpecimenDeleteConfigurator config) {
-        return defaultService.deleteDerivateHierarchy(from, config);
-    }
-
     @Override
     public DeleteResult delete(SpecimenOrObservationBase<?> specimen, SpecimenDeleteConfigurator config) {
         return defaultService.delete(specimen, config);
     @Override
     public DeleteResult delete(SpecimenOrObservationBase<?> specimen, SpecimenDeleteConfigurator config) {
         return defaultService.delete(specimen, config);
@@ -988,9 +981,6 @@ public class TransientOccurenceService implements IOccurrenceService {
        }
 
 
        }
 
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IService#delete(java.util.UUID)
-     */
     @Override
     public DeleteResult delete(UUID uuid) {
         return defaultService.delete(uuid);
     @Override
     public DeleteResult delete(UUID uuid) {
         return defaultService.delete(uuid);
@@ -1001,54 +991,22 @@ public class TransientOccurenceService implements IOccurrenceService {
         return defaultService.delete(arg0);
     }
 
         return defaultService.delete(arg0);
     }
 
-    @Override
-    public DeleteResult deleteSingleRead(SingleRead singleRead, Sequence sequence){
-        return defaultService.deleteSingleRead(singleRead, sequence);
-    }
 
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IService#merge(java.util.List)
-     */
     @Override
     public List<SpecimenOrObservationBase> merge(List<SpecimenOrObservationBase> arg0) {
         return defaultService.merge(arg0);
     }
 
     @Override
     public List<SpecimenOrObservationBase> merge(List<SpecimenOrObservationBase> arg0) {
         return defaultService.merge(arg0);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#deleteDerivateHierarchy(java.util.UUID, eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator)
-     */
-    @Override
-    public DeleteResult deleteDerivateHierarchy(UUID arg0, SpecimenDeleteConfigurator arg1) {
-        return defaultService.deleteDerivateHierarchy(arg0, arg1);
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#deleteSingleRead(java.util.UUID, java.util.UUID)
-     */
-    @Override
-    public DeleteResult deleteSingleRead(UUID arg0, UUID arg1) {
-        return defaultService.deleteSingleRead(arg0, arg1);
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#moveDerivate(java.util.UUID, java.util.UUID, java.util.UUID)
-     */
     @Override
     public UpdateResult moveDerivate(UUID arg0, UUID arg1, UUID arg2) {
         return defaultService.moveDerivate(arg0, arg1, arg2);
     }
 
     @Override
     public UpdateResult moveDerivate(UUID arg0, UUID arg1, UUID arg2) {
         return defaultService.moveDerivate(arg0, arg1, arg2);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#moveDerivate(eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase, eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase, eu.etaxonomy.cdm.model.occurrence.DerivedUnit)
-     */
     @Override
     public boolean moveDerivate(SpecimenOrObservationBase<?> from, SpecimenOrObservationBase<?> to, DerivedUnit derivate) {
         return defaultService.moveDerivate(from, to, derivate);
     }
 
     @Override
     public boolean moveDerivate(SpecimenOrObservationBase<?> from, SpecimenOrObservationBase<?> to, DerivedUnit derivate) {
         return defaultService.moveDerivate(from, to, derivate);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#moveSequence(java.util.UUID, java.util.UUID, java.util.UUID)
-     */
     @Override
     public UpdateResult moveSequence(UUID arg0, UUID arg1, UUID arg2) {
         return defaultService.moveSequence(arg0, arg1, arg2);
     @Override
     public UpdateResult moveSequence(UUID arg0, UUID arg1, UUID arg2) {
         return defaultService.moveSequence(arg0, arg1, arg2);
@@ -1060,17 +1018,11 @@ public class TransientOccurenceService implements IOccurrenceService {
         return defaultService.getMediainHierarchy(arg0, arg1, arg2, arg3);
     }
 
         return defaultService.getMediainHierarchy(arg0, arg1, arg2, arg3);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IService#merge(java.util.List, boolean)
-     */
     @Override
     public List<MergeResult<SpecimenOrObservationBase>> merge(List<SpecimenOrObservationBase> arg0, boolean arg1) {
         return defaultService.merge(arg0, arg1);
     }
 
     @Override
     public List<MergeResult<SpecimenOrObservationBase>> merge(List<SpecimenOrObservationBase> arg0, boolean arg1) {
         return defaultService.merge(arg0, arg1);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IService#merge(eu.etaxonomy.cdm.model.common.ICdmBase, boolean)
-     */
     @Override
     public MergeResult<SpecimenOrObservationBase> merge(SpecimenOrObservationBase arg0, boolean arg1) {
         return defaultService.merge(arg0, arg1);
     @Override
     public MergeResult<SpecimenOrObservationBase> merge(SpecimenOrObservationBase arg0, boolean arg1) {
         return defaultService.merge(arg0, arg1);
@@ -1085,12 +1037,17 @@ public class TransientOccurenceService implements IOccurrenceService {
         return defaultService.listAssociatedTaxa(arg0, arg1, arg2, arg3, arg4);
     }
 
         return defaultService.listAssociatedTaxa(arg0, arg1, arg2, arg3, arg4);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IService#loadWithUpdate(java.util.UUID)
-     */
     @Override
     public SpecimenOrObservationBase loadWithUpdate(UUID arg0) {
         return defaultService.loadWithUpdate(arg0);
     }
 
     @Override
     public SpecimenOrObservationBase loadWithUpdate(UUID arg0) {
         return defaultService.loadWithUpdate(arg0);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public DeleteResult delete(UUID arg0, SpecimenDeleteConfigurator arg1) {
+        return defaultService.delete(arg0, arg1);
+    }
+
 }
 }
index a095409820eceac0619944df587cb2a934934863..bfb5f5751547c5d54daf8bbe8fc89eb73de2e959 100644 (file)
@@ -80,12 +80,12 @@ public class DeleteDerivateOperation extends AbstractPostOperation<CdmBase> {
                 && treeNode.getValue().equals(element)
                 && treeNode.getParent()!=null
                 && treeNode.getParent().getValue() instanceof Sequence){
                 && treeNode.getValue().equals(element)
                 && treeNode.getParent()!=null
                 && treeNode.getParent().getValue() instanceof Sequence){
-            deleteResult = CdmStore.getService(IOccurrenceService.class).deleteSingleRead(((SingleRead)element).getUuid(),
+            deleteResult = CdmStore.getService(ISequenceService.class).deleteSingleRead(((SingleRead)element).getUuid(),
                     ((Sequence) treeNode.getParent().getValue()).getUuid());
         } else if(element instanceof Sequence){
                     ((Sequence) treeNode.getParent().getValue()).getUuid());
         } else if(element instanceof Sequence){
-            deleteResult = CdmStore.getService(ISequenceService.class).delete(element.getUuid(), deleteConfigurator);
+            deleteResult = CdmStore.getService(ISequenceService.class).delete(element.getUuid());
         } else {
         } else {
-            deleteResult = CdmStore.getService(IOccurrenceService.class).deleteDerivateHierarchy(element.getUuid(), deleteConfigurator);
+            deleteResult = CdmStore.getService(IOccurrenceService.class).delete(element.getUuid(), deleteConfigurator);
         }
         if(deleteResult.isOk()){
             if(getPostOperationEnabled() instanceof DerivateView){
         }
         if(deleteResult.isOk()){
             if(getPostOperationEnabled() instanceof DerivateView){