Interface PurgeSandboxWorkflowEntitiesDao
- All Known Implementing Classes:
PurgeSandboxWorkflowEntitiesDaoImpl
public interface PurgeSandboxWorkflowEntitiesDao
A DAO to aid in retrieving and removing
WorkflowSandBoxItems and its related entities- Author:
- Jay Aisenbrey (cja769)
-
Method Summary
Modifier and TypeMethodDescriptionintRemoves all orphanedApprovalDetailssintbatchRemoveDeployments(Date expiryDate) Removes all orphanedWorkflowDeploymentsintRemoves all orphanedPromotionDetailssintbatchRemoveWorkflowEvents(Date expiryDate) Removes all orphanedWorkflowEventsintbatchRemoveWorkflowSandBoxEventItems(Set<Long> workflowIds) RemovesWorkflowEventWorkflowItemXrefwhere the item id is in the given set of longsintbatchRemoveWorkflowSandBoxItems(Set<Long> workflowIds) Removes theWorkflowSandBoxItems for the given idsreadArchivedParentWorkflowSandBoxItems(Set<Long> itemsToIgnore, Date expiryDate, int maxResults, boolean filterSiteOverrides) Retrieves theWorkflowSandBoxItems that are archived, are older than expiryDate, whose id isn't in itemsToIgnore, and doesn't have aWorkflowSandBoxItemthat depend on them.Returns theWorkflowEvent, if it exists, for the givenWorkflowSandBoxItem
-
Method Details
-
readArchivedParentWorkflowSandBoxItems
List<WorkflowSandBoxItem> readArchivedParentWorkflowSandBoxItems(Set<Long> itemsToIgnore, Date expiryDate, int maxResults, boolean filterSiteOverrides) Retrieves theWorkflowSandBoxItems that are archived, are older than expiryDate, whose id isn't in itemsToIgnore, and doesn't have aWorkflowSandBoxItemthat depend on them. Additionally the filterSiteOverrides parameter dictates if we should returnWorkflowSandBoxItems that are for a site override.- Parameters:
itemsToIgnore- A set of longs that indicate theWorkflowSandBoxItemids that should not filtered out from the result setexpiryDate- The most recentDateof an archivedWorkflowSandBoxItemthat shoudl be returnedmaxResults- The maximum number of results that should be returnedfilterSiteOverrides- A boolean indicating ifWorkflowSandBoxItemfor site overrides should be returned. If true then they will filtered; else they will be included in the result- Returns:
- A List of
WorkflowSandBoxItems that meet the given criteria
-
readWorkflowEventByWorkflowSandBoxItem
Returns theWorkflowEvent, if it exists, for the givenWorkflowSandBoxItem- Parameters:
item- TheWorkflowSandBoxItemto find theWorkflowEventfor- Returns:
- The corresponding
WorkflowEventfor the givenWorkflowSandBoxItem
-
batchRemoveWorkflowSandBoxEventItems
RemovesWorkflowEventWorkflowItemXrefwhere the item id is in the given set of longs- Parameters:
workflowIds- TheWorkflowSandBoxItemids whoseWorkflowEventWorkflowItemXrefs should be removed for- Returns:
- The number of records deleted
-
batchRemoveWorkflowSandBoxItems
Removes theWorkflowSandBoxItems for the given ids- Parameters:
workflowIds- The ids for theWorkflowSandBoxItems that should be removed- Returns:
- The number of records deleted
-
batchRemoveWorkflowEvents
Removes all orphanedWorkflowEvents- Parameters:
expiryDate- is a limit of time to perform the Remove- Returns:
- The number of records deleted
-
batchRemoveDeployments
Removes all orphanedWorkflowDeployments- Parameters:
expiryDate- is a limit of time to perform the Remove- Returns:
- The number of records deleted
-
batchRemoveApprovals
int batchRemoveApprovals()Removes all orphanedApprovalDetailss- Returns:
- The number of records deleted
-
batchRemovePromotions
int batchRemovePromotions()Removes all orphanedPromotionDetailss- Returns:
- The number of records deleted
-