import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.model.description.FeatureNode;
import eu.etaxonomy.cdm.model.description.FeatureTree;
return result;
}
+ @Override
+ public UpdateResult createChildFeatureNode(FeatureNode node, Feature featureChild){
+ DefinedTermBase feature = termService.save(featureChild);
+ FeatureNode childNode = FeatureNode.NewInstance(featureChild);
+ save(childNode);
+ UpdateResult result = new UpdateResult();
+ node.addChild(childNode);
+ result.addUpdatedObject(node);
+ result.setCdmEntity(node.getFeatureTree());
+ return result;
+ }
+
@Override
public UpdateResult addChildFeatureNode(FeatureNode node, Feature featureChild){
UpdateResult result = new UpdateResult();
FeatureNode childNode = FeatureNode.NewInstance(featureChild);
node.addChild(childNode);
result.addUpdatedObject(node);
+ result.setCdmEntity(node.getFeatureTree());
return result;
}
*/\r
public UpdateResult addChildFeatureNode(FeatureNode parentNode, Feature featureChild);\r
\r
+\r
+ /**\r
+ * Creates, saves and adds the specified feature as a child node to the given feature node\r
+ * @param parentNode the feature node where the new feature should be added\r
+ * @param featureChild the feature which should be added to the given feature node\r
+ * @return the result of the operation\r
+ */\r
+ public UpdateResult createChildFeatureNode(FeatureNode node, Feature featureChild);\r
+\r
/**\r
* Adds the specified feature as a child node to the given feature node\r
* @param parentNodeUUID the UUID of the feature node where the new feature should be added\r