fix #5692: adapt delete algorithm to annotatedLineEditor mechanisms
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / bulkeditor / input / ReferenceEditorInput.java
index 8b8c11360c4442e1c160b9ed43ea630209e3b738..48cf55fbc82f0b42027b0e3ca2cd9722fa90c836 100644 (file)
@@ -14,6 +14,7 @@ import java.util.List;
 import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IReferenceService;
+import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
 import eu.etaxonomy.cdm.model.common.MarkerType;
@@ -132,19 +133,14 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
        /** {@inheritDoc}
         * @throws ReferencedObjectUndeletableException */
        @Override
-    public boolean delete(Reference entity) throws ReferencedObjectUndeletableException {
-               return CdmStore.getService(IReferenceService.class).delete(entity) != null;
+    public boolean delete(Reference entity, DeleteConfiguratorBase config) throws ReferencedObjectUndeletableException {
+               return CdmStore.getService(IReferenceService.class).delete(entity.getUuid()) != null;
        }
 
        /** {@inheritDoc} */
        @Override
     public Reference save(Reference entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IReferenceService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IReferenceService.class).saveOrUpdate(entity);
-               return entity;
-           }
+          return CdmStore.getService(IReferenceService.class).merge(entity, true).getMergedEntity();
        }
 
        /* (non-Javadoc)