Class HibernateWorkflowHistoryDAO

    • Method Summary

      All Methods Instance Methods Concrete 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 identifiers
      List<Long> findTemplateIds()
      Get all template identifiers
      boolean store​(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, getDbms, getSessionFactory, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, setSessionFactory
      • Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO

        bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString
    • Method Detail

      • findByTemplateIdAndInstanceId

        public List<WorkflowHistory> findByTemplateIdAndInstanceId​(Long templateId,
                                                                   String instanceId,
                                                                   String event)
        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
      • findByUserIdAndInstanceId

        public List<WorkflowHistory> findByUserIdAndInstanceId​(Long userId,
                                                               String instanceId,
                                                               String event)
        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
      • findByInstanceId

        public List<WorkflowHistory> findByInstanceId​(String instanceId,
                                                      String event)
        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
      • cleanOldHistories

        public void cleanOldHistories​(int ttl)
        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
      • deleteByInstanceid

        public void deleteByInstanceid​(String instanceId)
        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
      • store

        public boolean store​(WorkflowHistory history)
                      throws com.logicaldoc.core.PersistenceException
        Specified by:
        store in interface com.logicaldoc.core.PersistentObjectDAO<WorkflowHistory>
        Overrides:
        store in class com.logicaldoc.core.HibernatePersistentObjectDAO<WorkflowHistory>
        Throws:
        com.logicaldoc.core.PersistenceException