Package com.logicaldoc.workflow.history
Class HibernateWorkflowHistoryDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<WorkflowHistory>
com.logicaldoc.core.history.HibernateHistoryDAO<WorkflowHistory>
com.logicaldoc.workflow.history.HibernateWorkflowHistoryDAO
- All Implemented Interfaces:
- com.logicaldoc.core.PersistentObjectDAO<WorkflowHistory>,- WorkflowHistoryDAO
@Repository("workflowHistoryDAO")
public class HibernateWorkflowHistoryDAO
extends com.logicaldoc.core.history.HibernateHistoryDAO<WorkflowHistory>
implements WorkflowHistoryDAO
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier and TypeMethodDescriptionvoidcleanOldHistories(int ttl) This method deletes all the workflow history entries oldest than the given days from now.voiddeleteByInstanceid(String instanceId) Deletes the histories of the specified instance.findByInstanceId(String instanceId, WorkflowEvent event) This method selects all histories of a given instanceId.findByTemplateIdAndInstanceId(Long templateId, String instanceId, WorkflowEvent event) This method selects all histories of a template with the given templateId and of a instance with the given instanceId.findByUserIdAndInstanceId(Long userId, String instanceId, WorkflowEvent event) This method selects all histories of a template with the given templateId and of a instance with the given instanceId.Get all instances identifiersGet all template identifiersMethods inherited from class com.logicaldoc.core.history.HibernateHistoryDAOstoreMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAObulkUpdate, delete, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, setSessionFactoryMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.PersistentObjectDAObulkUpdate, delete, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store
- 
Method Details- 
findByTemplateIdAndInstanceIdpublic List<WorkflowHistory> findByTemplateIdAndInstanceId(Long templateId, String instanceId, WorkflowEvent event) throws com.logicaldoc.core.PersistenceException Description copied from interface:WorkflowHistoryDAOThis method selects all histories of a template with the given templateId and of a instance with the given instanceId.- Specified by:
- findByTemplateIdAndInstanceIdin interface- WorkflowHistoryDAO
- Parameters:
- templateId- The Workflow Persistence Template Id
- instanceId- The Workflow Instance Id
- event- Optional selector of the event
- Returns:
- list of histories ordered by last modified date
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
findByUserIdAndInstanceIdpublic List<WorkflowHistory> findByUserIdAndInstanceId(Long userId, String instanceId, WorkflowEvent event) throws com.logicaldoc.core.PersistenceException Description copied from interface:WorkflowHistoryDAOThis method selects all histories of a template with the given templateId and of a instance with the given instanceId.- Specified by:
- findByUserIdAndInstanceIdin interface- WorkflowHistoryDAO
- Parameters:
- userId- The user that interacted with the WF
- instanceId- The Workflow Instance Id
- event- Optional selector of the event
- Returns:
- list of histories ordered by last modified date
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
findByInstanceIdpublic List<WorkflowHistory> findByInstanceId(String instanceId, WorkflowEvent event) throws com.logicaldoc.core.PersistenceException Description copied from interface:WorkflowHistoryDAOThis method selects all histories of a given instanceId.- Specified by:
- findByInstanceIdin interface- WorkflowHistoryDAO
- Parameters:
- instanceId- The Workflow Instance Id
- event- Optional selector of the event
- Returns:
- list of histories ordered by last modified date
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
findInstanceIdsDescription copied from interface:WorkflowHistoryDAOGet all instances identifiers- Specified by:
- findInstanceIdsin interface- WorkflowHistoryDAO
- Returns:
- list of identifiers
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
findTemplateIdsDescription copied from interface:WorkflowHistoryDAOGet all template identifiers- Specified by:
- findTemplateIdsin interface- WorkflowHistoryDAO
- Returns:
- list of identifiers
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
cleanOldHistoriespublic void cleanOldHistories(int ttl) throws com.logicaldoc.core.PersistenceException Description copied from interface:WorkflowHistoryDAOThis method deletes all the workflow history entries oldest than the given days from now. Ifttlis 0 or -1, the cancellation is not made.- Specified by:
- cleanOldHistoriesin interface- WorkflowHistoryDAO
- Parameters:
- ttl- The maximum number of days over which the history is considered old
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
deleteByInstanceidDescription copied from interface:WorkflowHistoryDAODeletes the histories of the specified instance.- Specified by:
- deleteByInstanceidin interface- WorkflowHistoryDAO
- Parameters:
- instanceId- identifier of the workflow instance
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
 
-