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 Details

    • readArchivedParentWorkflowSandBoxItems

      List<WorkflowSandBoxItem> readArchivedParentWorkflowSandBoxItems(Set<Long> itemsToIgnore, Date expiryDate, int maxResults, boolean filterSiteOverrides)
      Retrieves the WorkflowSandBoxItems that are archived, are older than expiryDate, whose id isn't in itemsToIgnore, and doesn't have a WorkflowSandBoxItem that depend on them. Additionally the filterSiteOverrides parameter dictates if we should return WorkflowSandBoxItems that are for a site override.
      Parameters:
      itemsToIgnore - A set of longs that indicate the WorkflowSandBoxItem ids that should not filtered out from the result set
      expiryDate - The most recent Date of an archived WorkflowSandBoxItem that shoudl be returned
      maxResults - The maximum number of results that should be returned
      filterSiteOverrides - A boolean indicating if WorkflowSandBoxItem for 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

      WorkflowEvent readWorkflowEventByWorkflowSandBoxItem(WorkflowSandBoxItem item)
      Returns the WorkflowEvent, if it exists, for the given WorkflowSandBoxItem
      Parameters:
      item - The WorkflowSandBoxItem to find the WorkflowEvent for
      Returns:
      The corresponding WorkflowEvent for the given WorkflowSandBoxItem
    • batchRemoveWorkflowSandBoxEventItems

      int batchRemoveWorkflowSandBoxEventItems(Set<Long> workflowIds)
      Removes WorkflowEventWorkflowItemXref where the item id is in the given set of longs
      Parameters:
      workflowIds - The WorkflowSandBoxItem ids whose WorkflowEventWorkflowItemXrefs should be removed for
      Returns:
      The number of records deleted
    • batchRemoveWorkflowSandBoxItems

      int batchRemoveWorkflowSandBoxItems(Set<Long> workflowIds)
      Removes the WorkflowSandBoxItems for the given ids
      Parameters:
      workflowIds - The ids for the WorkflowSandBoxItems that should be removed
      Returns:
      The number of records deleted
    • batchRemoveWorkflowEvents

      int batchRemoveWorkflowEvents(Date expiryDate)
      Removes all orphaned WorkflowEvents
      Parameters:
      expiryDate - is a limit of time to perform the Remove
      Returns:
      The number of records deleted
    • batchRemoveDeployments

      int batchRemoveDeployments(Date expiryDate)
      Removes all orphaned WorkflowDeployments
      Parameters:
      expiryDate - is a limit of time to perform the Remove
      Returns:
      The number of records deleted
    • batchRemoveApprovals

      int batchRemoveApprovals()
      Removes all orphaned ApprovalDetailss
      Returns:
      The number of records deleted
    • batchRemovePromotions

      int batchRemovePromotions()
      Removes all orphaned PromotionDetailss
      Returns:
      The number of records deleted