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

public class HibernateWorkflowHistoryDAO extends com.logicaldoc.core.history.HibernateHistoryDAO<WorkflowHistory> implements WorkflowHistoryDAO
  • Field Summary

    Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO

    ENTITY
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method deletes all the workflow history entries oldest than the given days from now.
    void
    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 identifiers
    Get all template identifiers

    Methods inherited from class com.logicaldoc.core.history.HibernateHistoryDAO

    store

    Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO

    bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, getSessionFactory, initialize, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, setSessionFactory

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO

    bulkUpdate, delete, delete, deleteAll, deleteAll, 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, store
  • Method Details

    • findByTemplateIdAndInstanceId

      public List<WorkflowHistory> findByTemplateIdAndInstanceId(Long templateId, String instanceId, String event) throws com.logicaldoc.core.PersistenceException
      Description copied from interface: WorkflowHistoryDAO
      This method selects all histories of a template with the given templateId and of a instance with the given instanceId.
      Specified by:
      findByTemplateIdAndInstanceId in 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
    • findByUserIdAndInstanceId

      public List<WorkflowHistory> findByUserIdAndInstanceId(Long userId, String instanceId, String event) throws com.logicaldoc.core.PersistenceException
      Description copied from interface: WorkflowHistoryDAO
      This method selects all histories of a template with the given templateId and of a instance with the given instanceId.
      Specified by:
      findByUserIdAndInstanceId in 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
    • findByInstanceId

      public List<WorkflowHistory> findByInstanceId(String instanceId, String event) throws com.logicaldoc.core.PersistenceException
      Description copied from interface: WorkflowHistoryDAO
      This method selects all histories of a given instanceId.
      Specified by:
      findByInstanceId in 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
    • findInstanceIds

      public List<String> findInstanceIds() throws com.logicaldoc.core.PersistenceException
      Description copied from interface: WorkflowHistoryDAO
      Get all instances identifiers
      Specified by:
      findInstanceIds in interface WorkflowHistoryDAO
      Returns:
      list of identifiers
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database
    • findTemplateIds

      public List<Long> findTemplateIds() throws com.logicaldoc.core.PersistenceException
      Description copied from interface: WorkflowHistoryDAO
      Get all template identifiers
      Specified by:
      findTemplateIds in interface WorkflowHistoryDAO
      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: WorkflowHistoryDAO
      This method deletes all the workflow history entries oldest than the given days from now. If ttl is 0 or -1, the cancellation is not made.
      Specified by:
      cleanOldHistories in 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
    • deleteByInstanceid

      public void deleteByInstanceid(String instanceId) throws com.logicaldoc.core.PersistenceException
      Description copied from interface: WorkflowHistoryDAO
      Deletes the histories of the specified instance.
      Specified by:
      deleteByInstanceid in interface WorkflowHistoryDAO
      Parameters:
      instanceId - identifier of the workflow instance
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database