Package de.xima.fc.dao.interfaces
Interface IWorkflowVersionBackupDao
- All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<WorkflowVersionBackup,
,Long, IEntityContext> IGenericDao<WorkflowVersionBackup>
- All Known Implementing Classes:
WorkflowVersionBackupDao
Data access object for creating, updating, and deleting
WorkflowVersionBackup
entities.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionallByWorkflowVersion
(IEntityContext ec, WorkflowVersion workflowVersion) Retrieves all available backups for the given workflow version, sorted in ascending order bygetDateCreated()
.createNewBackup
(IEntityContext ec, WorkflowVersion workflowVersion, String backupData) Creates a new workflow version backup with the data of the given workflow version.void
deleteAllByWorkflowVersion
(IEntityContext ec, WorkflowVersion workflowVersion) Deletes all backups for the given workflow version.Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao
all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
Methods inherited from interface de.xima.fc.dao.interfaces.IGenericDao
count, findAll, findSingle, getEntityRefs, read
-
Method Details
-
allByWorkflowVersion
List<WorkflowVersionBackup> allByWorkflowVersion(IEntityContext ec, WorkflowVersion workflowVersion) Retrieves all available backups for the given workflow version, sorted in ascending order bygetDateCreated()
.- 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
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
-