Class DefaultAsModelCloningContext
- java.lang.Object
-
- de.hybris.platform.adaptivesearch.strategies.impl.DefaultAsModelCloningContext
-
- All Implemented Interfaces:
ModelCloningContext
public class DefaultAsModelCloningContext extends java.lang.Object implements ModelCloningContext
Default Adaptive Search implementation of model cloning context.
-
-
Constructor Summary
Constructors Constructor Description DefaultAsModelCloningContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsUidGeneratorgetAsUidGenerator()java.lang.ObjectgetPresetValue(java.lang.Object model, java.lang.String qualifier)Only valid ifModelCloningContext.usePresetValue(Object, String)returnstruefor the specified attribute.TypeServicegetTypeService()voidsetAsUidGenerator(AsUidGenerator asUidGenerator)voidsetTypeService(TypeService typeService)booleanskipAttribute(java.lang.Object model, java.lang.String qualifier)Iftruethat particular attribute will not be included in the cloning process.booleantreatAsPartOf(java.lang.Object model, 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 model, 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).
-
-
-
Method Detail
-
skipAttribute
public boolean skipAttribute(java.lang.Object model, 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 model, 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 model, 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 model, 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
-
getTypeService
public TypeService getTypeService()
-
setTypeService
public void setTypeService(TypeService typeService)
-
getAsUidGenerator
public AsUidGenerator getAsUidGenerator()
-
setAsUidGenerator
public void setAsUidGenerator(AsUidGenerator asUidGenerator)
-
-