merge trunk into model change 3.6
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / config / SpecimenDeleteConfigurator.java
index aec94ae72aa8e52d6861e5ca06b166d1d04e1e51..bb7b15ba26cd221cd53c02004e4e227276238ff3 100644 (file)
@@ -9,6 +9,10 @@
 */
 package eu.etaxonomy.cdm.api.service.config;
 
+import eu.etaxonomy.cdm.model.description.DescriptionBase;
+import eu.etaxonomy.cdm.model.description.SpecimenDescription;
+import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
+
 
 /**
  * @author pplitzner
@@ -17,9 +21,38 @@ package eu.etaxonomy.cdm.api.service.config;
  */
 public class SpecimenDeleteConfigurator extends DeleteConfiguratorBase {
 
+    /**
+     * If <code>true</code> all sub derivates of the specimen are deleted.
+     */
     private boolean deleteChildren;
-    private boolean shiftHierarchyUp;
-    private boolean ignoreDeleteTypeDesignation;
+    /**
+     * TODO: is this needed? For which use case?
+     * Shifts the sub derivates of the deleted specimen to the parents of the
+     * deleted specimen i.e. adds the sub derivates to the derivation event of
+     * the parent
+     */
+//    private boolean shiftHierarchyUp;
+    /**
+     * If <code>true</code> the {@link SpecimenTypeDesignation} which
+     * uses the specimen.
+     */
+    private boolean deleteFromTypeDesignation;
+    /**
+     * If <code>true</code> the
+     */
+    private boolean deleteFromIndividualsAssociation;
+    /**
+     * If <code>true</code> the specimen is deleted
+     * from a {@link DescriptionBase} if it is set as "described" specimen.<br>
+     * If the description is a {@link SpecimenDescription} then it is also deleted
+     */
+    private boolean deleteFromDescription;
+
+    /**
+     * If <code>true</code> then attached molecular data like amplification results
+     * and sequences are deleted
+     */
+    private boolean isDeleteMolecularData;
 
     public boolean isDeleteChildren() {
         return deleteChildren;
@@ -29,20 +62,44 @@ public class SpecimenDeleteConfigurator extends DeleteConfiguratorBase {
         this.deleteChildren = deleteChildren;
     }
 
-    public boolean isShiftHierarchyUp() {
-        return shiftHierarchyUp;
+//    public boolean isShiftHierarchyUp() {
+//        return shiftHierarchyUp;
+//    }
+//
+//    public void setShiftHierarchyUp(boolean shiftHierarchyUp) {
+//        this.shiftHierarchyUp = shiftHierarchyUp;
+//    }
+
+    public boolean isDeleteFromTypeDesignation() {
+        return deleteFromTypeDesignation;
+    }
+
+    public void setDeleteFromTypeDesignation(boolean deleteFromTypeDesignation) {
+        this.deleteFromTypeDesignation = deleteFromTypeDesignation;
+    }
+
+    public boolean isDeleteFromIndividualsAssociation() {
+        return deleteFromIndividualsAssociation;
+    }
+
+    public void setDeleteFromIndividualsAssociation(boolean deleteFromIndividualsAssociation) {
+        this.deleteFromIndividualsAssociation = deleteFromIndividualsAssociation;
+    }
+
+    public boolean isDeleteFromDescription() {
+        return deleteFromDescription;
     }
 
-    public void setShiftHierarchyUp(boolean shiftHierarchyUp) {
-        this.shiftHierarchyUp = shiftHierarchyUp;
+    public void setDeleteFromDescription(boolean deleteFromDescription) {
+        this.deleteFromDescription = deleteFromDescription;
     }
 
-    public boolean isIgnoreDeleteTypeDesignation() {
-        return ignoreDeleteTypeDesignation;
+    public boolean isDeleteMolecularData() {
+        return isDeleteMolecularData;
     }
 
-    public void setIgnoreDeleteTypeDesignation(boolean ignoreDeleteTypeDesignation) {
-        this.ignoreDeleteTypeDesignation = ignoreDeleteTypeDesignation;
+    public void setDeleteMolecularData(boolean isDeleteMolecularData) {
+        this.isDeleteMolecularData = isDeleteMolecularData;
     }
 
 }
\ No newline at end of file