Interface LogicCopyExecutor


public interface LogicCopyExecutor
  • Method Details

    • withParent

      LogicCopyExecutor withParent(@Nullable @Nullable Entity parent)
      define a parent which won't be copied
      Parameters:
      parent - the entity to ignore from the copy
    • withRelatedEntitiesToCopy

      LogicCopyExecutor withRelatedEntitiesToCopy(String relationToCopy)
      define a n:1 relation which should be copied
      Parameters:
      relationToCopy - path to the entities to copy
    • withRelatedEntitiesToCopy

      LogicCopyExecutor withRelatedEntitiesToCopy(Collection<String> relationsToCopy)
      define the related n:1 entities which should be copied
      Parameters:
      relationsToCopy - paths to the entities to copy
    • withRelatedEntitiesToCopy

      LogicCopyExecutor withRelatedEntitiesToCopy(Map<String,List<String>> relationsToCopy)
      same behaviour as $withRelatedEntitiesToCopy(Collection) except that the List of the map can be used to exclude some fields on the entity to copy
    • withExcludedRelation

      LogicCopyExecutor withExcludedRelation(String relationToExclude)
      exclude n:0..1 (and if absolutely necessary n:1) relation from being related to the newly copied entity if excluding n:1 relation be sure to set it manually!
      Parameters:
      relationToExclude - relation which should not be related
    • withExcludedRelations

      LogicCopyExecutor withExcludedRelations(Collection<String> relationsToExclude)
      exclude n:0..1 (and if absolutely necessary n:1) relations from being related to the newly copied entity if excluding n:1 relations be sure to set them manually!
      Parameters:
      relationsToExclude - list of relations which should not be related
    • withExcludedFields

      LogicCopyExecutor withExcludedFields(Collection<String> fieldsToExclude)
      exclude fields from being copied
      Parameters:
      fieldsToExclude - list of fields which should be excluded
    • addSuffixToLabel

      LogicCopyExecutor addSuffixToLabel(boolean addSuffix)
      control whether a suffix should be added to the label field or not. By default it's set to true.
    • doCopy

      Entity doCopy()