Class DefaultModelCloningContext

  • All Implemented Interfaces:
    ModelCloningContext

    public class DefaultModelCloningContext
    extends java.lang.Object
    implements ModelCloningContext
    Default model coning context.

    Does not provide any preset value and does not change partOf behavior.

    However it skips attributes which are defined as the many-end of a one-to-many relation in case they are not marked as partOf. If they would not be skipped the items referenced will finally be removed from the source item and assigned to the target item instead, which is not the intention of the cloning process.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getPresetValue​(java.lang.Object original, java.lang.String qualifier)
      Only valid if ModelCloningContext.usePresetValue(Object, String) returns true for the specified attribute.
      boolean skipAttribute​(java.lang.Object original, java.lang.String qualifier)
      If true that particular attribute will not be included in the cloning process.
      boolean treatAsPartOf​(java.lang.Object original, java.lang.String qualifier)
      If true that particular attribute is treated as partOf which results in deep-cloning each attribute value too before assigning them as value to the cloned model.
      boolean usePresetValue​(java.lang.Object original, java.lang.String qualifier)
      If true for the given attribute the cloning process will not use the original model attribute values but the one returned by ModelCloningContext.getPresetValue(Object, String).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait