Package com.logicaldoc.workflow.history
Class HibernateWorkflowHistoryDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<WorkflowHistory>
com.logicaldoc.workflow.history.HibernateWorkflowHistoryDAO
- All Implemented Interfaces:
com.logicaldoc.core.PersistentObjectDAO<WorkflowHistory>,WorkflowHistoryDAO
public class HibernateWorkflowHistoryDAO
extends com.logicaldoc.core.HibernatePersistentObjectDAO<WorkflowHistory>
implements WorkflowHistoryDAO
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY -
Method Summary
Modifier 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, String event) This method selects all histories of a given instanceId.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.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.Get all instances identifiersGet all template identifiersvoidstore(WorkflowHistory history) Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, getSessionFactory, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, setSessionFactoryMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString
-
Method Details
-
findByTemplateIdAndInstanceId
public List<WorkflowHistory> findByTemplateIdAndInstanceId(Long templateId, String instanceId, String 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 interfaceWorkflowHistoryDAO- 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
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findByUserIdAndInstanceId
public List<WorkflowHistory> findByUserIdAndInstanceId(Long userId, String instanceId, String 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 interfaceWorkflowHistoryDAO- 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
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findByInstanceId
public List<WorkflowHistory> findByInstanceId(String instanceId, String event) throws com.logicaldoc.core.PersistenceException Description copied from interface:WorkflowHistoryDAOThis method selects all histories of a given instanceId.- Specified by:
findByInstanceIdin interfaceWorkflowHistoryDAO- Parameters:
instanceId- The Workflow Instance Idevent- Optional selector of the event- Returns:
- list of histories ordered by last modified date
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findInstanceIds
Description copied from interface:WorkflowHistoryDAOGet all instances identifiers- Specified by:
findInstanceIdsin interfaceWorkflowHistoryDAO- Returns:
- list of identifiers
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findTemplateIds
Description copied from interface:WorkflowHistoryDAOGet all template identifiers- Specified by:
findTemplateIdsin interfaceWorkflowHistoryDAO- Returns:
- list of identifiers
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
cleanOldHistories
public 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 interfaceWorkflowHistoryDAO- Parameters:
ttl- The maximum number of days over which the history is considered old- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
deleteByInstanceid
Description copied from interface:WorkflowHistoryDAODeletes the histories of the specified instance.- Specified by:
deleteByInstanceidin interfaceWorkflowHistoryDAO- Parameters:
instanceId- identifier of the workflow instance- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
store
- Specified by:
storein interfacecom.logicaldoc.core.PersistentObjectDAO<WorkflowHistory>- Overrides:
storein classcom.logicaldoc.core.HibernatePersistentObjectDAO<WorkflowHistory>- Throws:
com.logicaldoc.core.PersistenceException
-