Package com.logicaldoc.workflow.history
Interface WorkflowHistoryDAO
-
- All Superinterfaces:
com.logicaldoc.core.PersistentObjectDAO<WorkflowHistory>
- All Known Implementing Classes:
HibernateWorkflowHistoryDAO
public interface WorkflowHistoryDAO extends com.logicaldoc.core.PersistentObjectDAO<WorkflowHistory>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cleanOldHistories(int ttl)
This method deletes all the workflow history entries oldest than the given days from now.void
deleteByInstanceid(String instanceId)
Deletes the histories of the specified instance.List<WorkflowHistory>
findByInstanceId(String instanceId, String event)
This method selects all histories of a given instanceId.List<WorkflowHistory>
findByTemplateIdAndInstanceId(Long templateId, String instanceId, String event)
This method selects all histories of a template with the given templateId and of a instance with the given instanceId.List<WorkflowHistory>
findByUserIdAndInstanceId(Long userId, String instanceId, String event)
This method selects all histories of a template with the given templateId and of a instance with the given instanceId.List<String>
findInstanceIds()
Get all instances identifiersList<Long>
findTemplateIds()
Get all template identifiers-
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForString, store
-
-
-
-
Method Detail
-
findByTemplateIdAndInstanceId
List<WorkflowHistory> findByTemplateIdAndInstanceId(Long templateId, String instanceId, String event)
This method selects all histories of a template with the given templateId and of a instance with the given instanceId.- Parameters:
templateId
- The Workflow Persistence Template IdinstanceId
- The Workflow Instance Idevent
- Optional selector of the event- Returns:
- list of histories ordered by last modified date
-
findByUserIdAndInstanceId
List<WorkflowHistory> findByUserIdAndInstanceId(Long userId, String instanceId, String event)
This method selects all histories of a template with the given templateId and of a instance with the given instanceId.- Parameters:
userId
- The user that interacted with the WFinstanceId
- The Workflow Instance Idevent
- Optional selector of the event- Returns:
- list of histories ordered by last modified date
-
findByInstanceId
List<WorkflowHistory> findByInstanceId(String instanceId, String event)
This method selects all histories of a given instanceId.- Parameters:
instanceId
- The Workflow Instance Idevent
- Optional selector of the event- Returns:
- list of histories ordered by last modified date
-
deleteByInstanceid
void deleteByInstanceid(String instanceId)
Deletes the histories of the specified instance.- Parameters:
instanceId
- identifier of the workflow instance
-
findInstanceIds
List<String> findInstanceIds()
Get all instances identifiers- Returns:
- list of identifiers
-
findTemplateIds
List<Long> findTemplateIds()
Get all template identifiers- Returns:
- list of identifiers
-
cleanOldHistories
void cleanOldHistories(int ttl)
This method deletes all the workflow history entries oldest than the given days from now. Ifttl
is 0 or -1, the cancellation is not made.- Parameters:
ttl
- The maximum number of days over which the history is considered old
-
-