public class DefaultItemModelCloneStrategy extends java.lang.Object implements ModelCloningStrategy
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 and Description |
|---|
DefaultItemModelCloneStrategy() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
clone(java.lang.Object original,
java.lang.String targetType,
ModelCloningContext ctx) |
<T> T |
clone(T original,
ModelCloningContext ctx) |
void |
setItemModelCloneCreator(ItemModelCloneCreator itemModelCloneCreator) |
void |
setTypeService(TypeService typeService) |
public <T> T clone(T original,
ModelCloningContext ctx)
clone in interface ModelCloningStrategypublic <T> T clone(java.lang.Object original,
java.lang.String targetType,
ModelCloningContext ctx)
clone in interface ModelCloningStrategypublic void setItemModelCloneCreator(ItemModelCloneCreator itemModelCloneCreator)
public void setTypeService(TypeService typeService)
Copyright © 2018 SAP SE. All Rights Reserved.