Interface SimpleCloneDao

All Known Implementing Classes:
SimpleCloneDaoImpl

public interface SimpleCloneDao
Responsible for maintenance and persistence of sandbox, catalog, or profile clone state related to a change.
Author:
Jeff Fischer
  • Method Details

    • archiveSandboxRecords

      void archiveSandboxRecords(SimpleCloneDao.CreateSandboxRequest request, List<Long> sandboxIds)
      Archive the sandbox state for one or more records. This includes management of the WorkflowCloneLibrary state.
      Parameters:
      request - A DTO of information useful during sandbox clone state management
      sandboxIds - The list of sandbox identifiers for the originating state that is being archived. Position index should match that of SimpleCloneDao.CreateSandboxRequest.targetIds.
    • createSandboxRecordIfApplicable

      Map<Long,SimpleCloneDao.CloneState> createSandboxRecordIfApplicable(SimpleCloneDao.CreateSandboxRequest request)
      Create a sandbox clone of one or more entities described in the request.
      Parameters:
      request - A DTO of information useful during sandbox clone state management.
      Returns:
      A map of original id to clone state resulting from the operation.
    • createCloneRecordIfApplicable

      Create a profile or catalog clone of one or more entities described in the request. This covers insertions during a propagation ADD.
      Parameters:
      request - A DTO of information useful during sandbox clone state management.
      Returns:
      A map of original change entity id to clone states resulting from the operation.
    • updateFKValuesIfApplicable

      void updateFKValuesIfApplicable(SimpleCloneDao.UpdateCloneFKRequest request, Map<Long,List<SimpleCloneDao.CloneState>> cloneIds)
      During propagation, discover foreign key references in a clone state in a profile or catalog and make sure that reference is correct to the member in that same catalog or profile, if applicable.
      Parameters:
      request - A DTO of information useful during FK evaluation for a list of clones
      cloneIds - A map of original change entity id to clone states
    • detectExistingClones

      Map<String,Map<Long,Long>> detectExistingClones(SimpleCloneDao.CloneLibRequest request)
      Find clones by using the information in WorkflowCloneLibrary.
      Parameters:
      request - A DTO of information useful during the clone library search
      Returns:
      A map of clone id by original id by class name
    • detectExistingClonesForPropagation

      SimpleCloneDao.ExistingClones detectExistingClonesForPropagation(String tableName, List<Long> targetIds)
      Given a table, find all the clones based on a list of original ids. This is needed for propagation. Note, production clones for propagation are not reflected in WorkflowCloneLibrary.
      Parameters:
      tableName - The table in which to search for clones
      targetIds - The ids that participate in the overall inheritance hierarchy. It is not required that these ids are at the base of the hierarchy.
      Returns:
      DTO structure that describes the clone structure for a catalog or profile, as the case may be.
    • getSiteTypes

      Map<Long,String> getSiteTypes(List<Long> siteIds)
      For a list of site ids, find the associated site type. This is a multitenant site concept.
      Parameters:
      siteIds - The site ids to search
      Returns:
      A map of site type for site id