Interface LogicCopyService

All Known Implementing Classes:
LogicCopyServiceImpl

public interface LogicCopyService
  • Method Details

    • createLogicCopyOf

      LogicCopyExecutor createLogicCopyOf(Entity originalEntity)
      gives you a complete Copy of the given entity with all relations. the fluent interface can be used to define the copy behaviour. Example: logicCopyService.createLogicCopyOf(subproject).withRelatedEntitiesToCopy(ImmutableSet.of(relTask)) .withExcludedRelations(ImmutableSet.of(relTask.relTask_note)).doCopy()
      Parameters:
      originalEntity - entity to copy
      Returns:
      copied entity
    • copyRelations

      Entity copyRelations(Entity copiedEntity, Entity originalEntity, Collection<String> excluded)
      same as copyRelations(Entity, Entity, Optional, Collection) but passes an absent optional for the third parameter (parentEntity)
      Parameters:
      copiedEntity - the entity to copy the relations to
      originalEntity - entity to get the relation values from
      excluded - list of relations which should be excluded from copy
    • copyRelations

      Entity copyRelations(Entity copiedEntity, Entity originalEntity, Optional<Entity> parentEntity, Collection<String> excluded)
      copies the references of relations that: - are not the parentEntity if one exists - are not 1:n from the view of the original entity (as this would modify the original entity) - are not excluded. (note that the related entities will not get copied!)
      Parameters:
      copiedEntity - the entity to copy the relations to
      originalEntity - entity to get the relation values from
      parentEntity - parent to ignore
      excluded - list of relations which should be excluded from copy