Interface ModelCloningContext
-
- All Known Implementing Classes:
CMSModelCloningContext,DefaultAsModelCloningContext,DefaultModelCloningContext,ProductCloneStrategy.ProductModelCloningContext
public interface ModelCloningContextAllows customization of cloning process.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetPresetValue(java.lang.Object original, java.lang.String qualifier)Only valid ifusePresetValue(Object, String)returnstruefor the specified attribute.booleanskipAttribute(java.lang.Object original, java.lang.String qualifier)Iftruethat particular attribute will not be included in the cloning process.booleantreatAsPartOf(java.lang.Object original, java.lang.String qualifier)Iftruethat particular attribute is treated as partOf which results in deep-cloning each attribute value too before assigning them as value to the cloned model.booleanusePresetValue(java.lang.Object original, java.lang.String qualifier)Iftruefor the given attribute the cloning process will not use the original model attribute values but the one returned bygetPresetValue(Object, String).
-
-
-
Method Detail
-
skipAttribute
boolean skipAttribute(java.lang.Object original, java.lang.String qualifier)Iftruethat particular attribute will not be included in the cloning process. As a result the cloned model will not have any value for that attribute.
-
treatAsPartOf
boolean treatAsPartOf(java.lang.Object original, java.lang.String qualifier)Iftruethat particular attribute is treated as partOf which results in deep-cloning each attribute value too before assigning them as value to the cloned model.This applies to model reference attributes only!
-
usePresetValue
boolean usePresetValue(java.lang.Object original, java.lang.String qualifier)Iftruefor the given attribute the cloning process will not use the original model attribute values but the one returned bygetPresetValue(Object, String).- See Also:
getPresetValue(Object, String)
-
getPresetValue
java.lang.Object getPresetValue(java.lang.Object original, java.lang.String qualifier)Only valid ifusePresetValue(Object, String)returnstruefor the specified attribute.Returns the value to be used as attribute value of the new cloned model.
-
-