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 Reference save(Reference entity) {
- if(CdmStore.getCurrentSessionManager().isRemoting()) {
- return CdmStore.getService(IReferenceService.class).merge(entity);
- } else {
- CdmStore.getService(IReferenceService.class).saveOrUpdate(entity);
- return entity;
- }
+ return CdmStore.getService(IReferenceService.class).merge(entity, true).getMergedEntity();
}
/* (non-Javadoc)