package eu.etaxonomy.taxeditor.bulkeditor.input;
+import java.util.Arrays;
import java.util.List;
+import java.util.UUID;
import eu.etaxonomy.cdm.api.service.IUserService;
+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.User;
*/
@Override
public User save(User entity) {
- if(CdmStore.getCurrentSessionManager().isRemoting()) {
- return CdmStore.getService(IUserService.class).merge(entity);
- } else {
- CdmStore.getService(IUserService.class).saveOrUpdate(entity);
- return entity;
- }
-
+ return CdmStore.getService(IUserService.class).merge(entity, true).getMergedEntity();
}
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#delete(java.lang.Object)
*/
@Override
- public boolean delete(User entity) throws ReferencedObjectUndeletableException {
+ public boolean delete(User entity, DeleteConfiguratorBase config) throws ReferencedObjectUndeletableException {
return CdmStore.getService(IUserService.class).delete(entity) != null;
}
public void merge() {
}
+
+
+ @Override
+ protected User loadEntity(UUID entityUuid) {
+ List<String> propertyPaths = Arrays.asList(new String[]{});
+ return CdmStore.getService(IUserService.class).load(entityUuid, propertyPaths);
+ }
+
}