import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
import eu.etaxonomy.cdm.model.common.MarkerType;
private List<T> model;
private IEntityCreator<T> entityCreator;
-
+
private static Class serviceClass;
/**
* @return a {@link eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput} object.
*/
static public AbstractBulkEditorInput NewInstance(BulkEditorInputType inputType) {
-
+
return BulkEditorInputType.getInput(inputType);
}
* @return a T object.
*/
protected T loadEntity(UUID entityUuid) {
- List<String> propertyPaths = Arrays.asList(new String[]{});
+ List<String> propertyPaths = Arrays.asList(new String[]{});
return (T) CdmStore.getService(serviceClass).load(entityUuid, propertyPaths);
}
if(getEntityUuid() != null){
- T entity = (T) loadEntity(getEntityUuid());
+ T entity = loadEntity(getEntityUuid());
entityList.add(entity);
model = entityList;
}
entityList = listEntities(configurator);
Collections.sort(entityList, queryComparator);
-
+
}
return false;
}
+ /**
+ * <p>isMergingEnabled</p>
+ *
+ * @return a boolean.
+ */
+ public boolean isConvertingEnabled() {
+ return false;
+ }
/**
* <p>isMarkerTypeEditingEnabled</p>
*
return false;
}
- /*
- * (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#merge(eu.etaxonomy.cdm.model.common.IdentifiableEntity, eu.etaxonomy.cdm.model.common.IdentifiableEntity)
- */
+
/** {@inheritDoc} */
@Override
public boolean merge(T entity, T mergeTarget) {
if (entity instanceof IMergable) {
try {
- CdmStore.getCommonService().merge((IMergable)mergeTarget, (IMergable)entity, null);
+ CdmStore.getCommonService().merge(mergeTarget.getId(), entity.getId(), (Class<? extends CdmBase>)entity.getClass());
} catch (MergeException e) {
MessagingUtils.errorDialog("Bulk Editor Merge Error",
this,
return true;
}
- /*
- * (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#create(eu.etaxonomy.cdm.model.common.IdentifiableEntity)
- */
+
/** {@inheritDoc} */
@Override
public boolean create(T entity) {
* Returns a textual representation given object. The default implementation
* in the abstract base class returns the simple name of the class, this may
* be overwritten to something more specific in subclasses.
- *
+ *
* @param entity
* @return a textual representation given object.
*/