Class DefaultItemModelCloneStrategy
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.model.impl.DefaultItemModelCloneStrategy
-
- All Implemented Interfaces:
ModelCloningStrategy
public class DefaultItemModelCloneStrategy extends java.lang.Object implements ModelCloningStrategy
The default model cloning strategy to be used byModelService.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 Constructor Description DefaultItemModelCloneStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tclone(java.lang.Object original, java.lang.String targetType, ModelCloningContext ctx)<T> Tclone(T original, ModelCloningContext ctx)voidsetItemModelCloneCreator(ItemModelCloneCreator itemModelCloneCreator)voidsetTypeService(TypeService typeService)
-
-
-
Method Detail
-
clone
public <T> T clone(T original, ModelCloningContext ctx)- Specified by:
clonein interfaceModelCloningStrategy
-
clone
public <T> T clone(java.lang.Object original, java.lang.String targetType, ModelCloningContext ctx)- Specified by:
clonein interfaceModelCloningStrategy
-
setItemModelCloneCreator
public void setItemModelCloneCreator(ItemModelCloneCreator itemModelCloneCreator)
-
setTypeService
public void setTypeService(TypeService typeService)
-
-