Class ProductCloneStrategy.ProductModelCloningContext
- java.lang.Object
-
- com.hybris.backoffice.cockpitng.dataaccess.facades.clone.ProductCloneStrategy.ProductModelCloningContext
-
- All Implemented Interfaces:
ModelCloningContext
- Enclosing class:
- ProductCloneStrategy
protected static class ProductCloneStrategy.ProductModelCloningContext extends java.lang.Object implements ModelCloningContext
-
-
Field Summary
Fields Modifier and Type Field Description protected TypeServicetypeService
-
Constructor Summary
Constructors Constructor Description ProductModelCloningContext(TypeService typeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetPresetValue(java.lang.Object original, java.lang.String qualifier)Only valid ifModelCloningContext.usePresetValue(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 byModelCloningContext.getPresetValue(Object, String).
-
-
-
Field Detail
-
typeService
protected final TypeService typeService
-
-
Constructor Detail
-
ProductModelCloningContext
public ProductModelCloningContext(TypeService typeService)
-
-
Method Detail
-
skipAttribute
public boolean skipAttribute(java.lang.Object original, java.lang.String qualifier)Description copied from interface:ModelCloningContextIftruethat particular attribute will not be included in the cloning process. As a result the cloned model will not have any value for that attribute.- Specified by:
skipAttributein interfaceModelCloningContext
-
treatAsPartOf
public boolean treatAsPartOf(java.lang.Object original, java.lang.String qualifier)Description copied from interface:ModelCloningContextIftruethat 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!
- Specified by:
treatAsPartOfin interfaceModelCloningContext
-
usePresetValue
public boolean usePresetValue(java.lang.Object original, java.lang.String qualifier)Description copied from interface:ModelCloningContextIftruefor the given attribute the cloning process will not use the original model attribute values but the one returned byModelCloningContext.getPresetValue(Object, String).- Specified by:
usePresetValuein interfaceModelCloningContext- See Also:
ModelCloningContext.getPresetValue(Object, String)
-
getPresetValue
public java.lang.Object getPresetValue(java.lang.Object original, java.lang.String qualifier)Description copied from interface:ModelCloningContextOnly valid ifModelCloningContext.usePresetValue(Object, String)returnstruefor the specified attribute.Returns the value to be used as attribute value of the new cloned model.
- Specified by:
getPresetValuein interfaceModelCloningContext
-
-