Class DefaultItemModelCloneStrategy
java.lang.Object
de.hybris.platform.servicelayer.internal.model.impl.DefaultItemModelCloneStrategy
- All Implemented Interfaces:
ModelCloningStrategy
The default model cloning strategy to be used by
ModelService.clone(Object).
This implementation creates a deep copy of the given original model by creating a new model instance of the same type, reading all attributes values and stores them into the new instance.
The only exception are part-of attribute values which consists of other models - these are cloned themself and then used a attribute value in the new model instance.
Internally it makes use of the ItemModelCloneCreator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Tclone(Object original, String targetType, ModelCloningContext ctx) <T> Tclone(T original, ModelCloningContext ctx) voidsetItemModelCloneCreator(ItemModelCloneCreator itemModelCloneCreator) voidsetTypeService(TypeService typeService)
-
Constructor Details
-
DefaultItemModelCloneStrategy
public DefaultItemModelCloneStrategy()
-
-
Method Details
-
clone
- Specified by:
clonein interfaceModelCloningStrategy
-
clone
- Specified by:
clonein interfaceModelCloningStrategy
-
setItemModelCloneCreator
-
setTypeService
-