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;
/** {@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 boolean save(Reference entity) {
- if(CdmStore.getCurrentSessionManager().isRemoting()) {
- return CdmStore.getService(IReferenceService.class).merge(entity) != null;
- } else {
- return CdmStore.getService(IReferenceService.class).saveOrUpdate(entity) != null;
- }
+ public Reference save(Reference entity) {
+ return CdmStore.getService(IReferenceService.class).merge(entity, true).getMergedEntity();
}
/* (non-Javadoc)
return super.getTypeText(entity);
}
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+ */
+ @Override
+ public void merge() {
+
+ }
+
}