Interface IWorkflowVersionBackupDao

All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<WorkflowVersionBackup,Long,IEntityContext>, IGenericDao<WorkflowVersionBackup>
All Known Implementing Classes:
WorkflowVersionBackupDao

public interface IWorkflowVersionBackupDao extends IGenericDao<WorkflowVersionBackup>
Data access object for creating, updating, and deleting WorkflowVersionBackup entities.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
  • Method Details

    • allByWorkflowVersion

      List<WorkflowVersionBackup> allByWorkflowVersion(IEntityContext ec, WorkflowVersion workflowVersion)
      Retrieves all available backups for the given workflow version, sorted in ascending order by getDateCreated().
      Parameters:
      ec - Current entity context for accessing the database.
      workflowVersion - Workflow version for which to retrieve all backups
      Returns:
      All existing backups for the given workflow version, sorted in ascending order by getDateCreated().
    • createNewBackup

      WorkflowVersionBackup createNewBackup(IEntityContext ec, WorkflowVersion workflowVersion, String backupData)
      Creates a new workflow version backup with the data of the given workflow version. Enforces a limit on the number of backups. No more than the specified number of backups will be present after the new backup was created. When the number of backups exceeds the limit, the oldest backups are deleted.
      Parameters:
      ec - Current entity context for accessing the database.
      workflowVersion - Workflow version to backup.
      backupData - Backup JSON data to store.
      Returns:
      The newly created backup.
    • deleteAllByWorkflowVersion

      void deleteAllByWorkflowVersion(IEntityContext ec, WorkflowVersion workflowVersion)
      Deletes all backups for the given workflow version.
      Parameters:
      ec - Current entity context for accessing the database.
      workflowVersion - Workflow version for which to delete all backups