Fix new occurrence / sequence move method calls
authorCherian Mathew <c.mathew@bgbm.org>
Fri, 4 Sep 2015 08:37:38 +0000 (10:37 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Fri, 4 Sep 2015 08:37:38 +0000 (10:37 +0200)
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/MoveDerivateOperation.java

index f06825b..4b5d010 100644 (file)
@@ -867,7 +867,7 @@ public class TransientOccurenceService implements IOccurrenceService {
 
 
     @Override
-    public boolean moveSequence(DnaSample from, DnaSample to, Sequence sequence) {
+    public UpdateResult moveSequence(DnaSample from, DnaSample to, Sequence sequence) {
         return defaultService.moveSequence(from, to, sequence);
     }
 
@@ -1045,5 +1045,13 @@ public class TransientOccurenceService implements IOccurrenceService {
         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);
+    }
+
 
 }
index 9931904..e7bfe69 100644 (file)
@@ -109,7 +109,7 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
         else if(draggedNodeValue instanceof SingleRead && targetNodeValue instanceof Sequence){
             SingleRead singleRead = (SingleRead) draggedNodeValue;
             if(fromParentSpecimen instanceof Sequence){
-                return CdmStore.getService(ISequenceService.class).moveSingleRead((Sequence)fromParentSpecimen, (Sequence)targetNodeValue, singleRead);
+                return CdmStore.getService(ISequenceService.class).moveSingleRead((Sequence)fromParentSpecimen, (Sequence)targetNodeValue, singleRead).isOk();
             }
         }
 
@@ -117,7 +117,7 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
         else if(draggedNodeValue instanceof Sequence && targetNodeValue instanceof DnaSample && ((SpecimenOrObservationBase<?>) targetNodeValue).getRecordBasis()==SpecimenOrObservationType.DnaSample){
             Sequence sequence = (Sequence)draggedNodeValue;
             if(fromParentSpecimen instanceof DnaSample && ((SpecimenOrObservationBase<?>) targetNodeValue).getRecordBasis()==SpecimenOrObservationType.DnaSample){
-                return occurrenceService.moveSequence((DnaSample)fromParentSpecimen, (DnaSample)targetNodeValue, sequence);
+                return occurrenceService.moveSequence((DnaSample)fromParentSpecimen, (DnaSample)targetNodeValue, sequence).isOk();
             }
         }
         return false;