Interface FolderHistoryDAO

All Superinterfaces:
PersistentObjectDAO<FolderHistory>
All Known Implementing Classes:
HibernateFolderHistoryDAO

public interface FolderHistoryDAO extends PersistentObjectDAO<FolderHistory>
DAO for FolderHistory handling.
Since:
5.0
Author:
Marco Meschieri - LogicalDOC
  • Method Details

    • findByUserId

      List<FolderHistory> findByUserId(long userId) throws PersistenceException
      This method selects all histories of a given user.
      Parameters:
      userId - identifier of the user
      Returns:
      list of histories ordered by date
      Throws:
      PersistenceException - Error in the database
    • findByFolderId

      List<FolderHistory> findByFolderId(long folderId) throws PersistenceException
      This method selects all histories of a given folder.
      Parameters:
      folderId - ID of the folder
      Returns:
      list of histories ordered by date
      Throws:
      PersistenceException - Error in the database
    • findByFolderIdAndEvent

      List<FolderHistory> findByFolderIdAndEvent(long folderId, String event, Date oldestDate) throws PersistenceException
      This method selects all histories of a given folder and event occurred after a given date.
      Parameters:
      folderId - ID of the folder
      event - code of the event to search
      oldestDate - optional oldest date
      Returns:
      list of histories ordered by date
      Throws:
      PersistenceException - Error in the database
    • findNotNotified

      List<FolderHistory> findNotNotified(Integer max) throws PersistenceException
      This method selects all histories not notified yet.
      Parameters:
      max - Optional maximum number of records
      Returns:
      list of histories ordered by date
      Throws:
      PersistenceException - Error in the database
    • findByUserIdAndEvent

      List<FolderHistory> findByUserIdAndEvent(long userId, String event) throws PersistenceException
      This method selects all histories of a given user and related to the given event.
      Parameters:
      userId - The user identifier
      event - The history event
      Returns:
      list of histories ordered by date
      Throws:
      PersistenceException - Error in the database
    • findByPath

      List<FolderHistory> findByPath(String pathExpression, Date oldestDate, Collection<String> events, Integer max) throws PersistenceException
      This method finds all histories about a path (you can use expression)
      Parameters:
      pathExpression - The path expression (like /Default/acme%)
      oldestDate - The older date for the retrieved histories
      events - Optional list of event codes to be used as filter
      max - Optional maximum number of records
      Returns:
      The list of histories that matched the given criteria
      Throws:
      PersistenceException - Error in the data layer
    • cleanOldHistories

      void cleanOldHistories(int ttl) throws PersistenceException
      This method deletes all the user history entries oldest than the given days from now. If ttl is 0 or -1, the cancellation is not made.
      Parameters:
      ttl - The maximum number of days over which the history is considered old
      Throws:
      PersistenceException - Error in the database