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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA simple DTO containing a clone referencestatic classA DTO containing useful information for retrieving instances ofWorkflowCloneLibrary.static classDetailed clone status of a specific catalog or profile entitystatic classRequest clone creation across catalogs or profiles for a propagating ADD operation.static classA DTO containing useful information for creating a sandbox clone of one or more recordsstatic classClones that already exist in a catalog or profile inheritance linestatic classA DTO representing a foreign key change during propagationstatic classRequest foreign key updates for recently inserted (or updated) clones after application of propagation data. -
Method Summary
Modifier and TypeMethodDescriptionvoidarchiveSandboxRecords(SimpleCloneDao.CreateSandboxRequest request, List<Long> sandboxIds) Archive the sandbox state for one or more records.Create a profile or catalog clone of one or more entities described in the request.Create a sandbox clone of one or more entities described in the request.Find clones by using the information inWorkflowCloneLibrary.detectExistingClonesForPropagation(String tableName, List<Long> targetIds) Given a table, find all the clones based on a list of original ids.getSiteTypes(List<Long> siteIds) For a list of site ids, find the associated site type.voidupdateFKValuesIfApplicable(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.
-
Method Details
-
archiveSandboxRecords
Archive the sandbox state for one or more records. This includes management of theWorkflowCloneLibrarystate.- Parameters:
request- A DTO of information useful during sandbox clone state managementsandboxIds- The list of sandbox identifiers for the originating state that is being archived. Position index should match that ofSimpleCloneDao.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
Map<Long,List<SimpleCloneDao.CloneState>> createCloneRecordIfApplicable(SimpleCloneDao.CreateInheritanceCloneRequest request) 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 clonescloneIds- A map of original change entity id to clone states
-
detectExistingClones
Find clones by using the information inWorkflowCloneLibrary.- 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 clonestargetIds- 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
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
-