Class HibernateImportFolderHistoryDAO

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cleanOldHistories​(int ttl)
      This method deletes all the import folder history entries oldest than the given days from now.
      List<ImportFolderHistory> findByImportFolderId​(long importFolderId, String event)
      This method selects all histories of a given import folder.
      void setFolderDAO​(com.logicaldoc.core.folder.FolderDAO folderDAO)  
      void setUserDAO​(com.logicaldoc.core.security.dao.UserDAO userDAO)  
      boolean store​(ImportFolderHistory history)  
      boolean store​(ImportFolderHistory history, com.logicaldoc.core.document.Document document)
      Stores a new 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

      • findByImportFolderId

        public List<ImportFolderHistory> findByImportFolderId​(long importFolderId,
                                                              String event)
        Description copied from interface: ImportFolderHistoryDAO
        This method selects all histories of a given import folder.
        Specified by:
        findByImportFolderId in interface ImportFolderHistoryDAO
        Parameters:
        importFolderId - Identifier of the import folder
        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: ImportFolderHistoryDAO
        This method deletes all the import folder 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 ImportFolderHistoryDAO
        Parameters:
        ttl - The maximum number of days over which the history is considered old
      • store

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

        public boolean store​(ImportFolderHistory history,
                             com.logicaldoc.core.document.Document document)
                      throws com.logicaldoc.core.PersistenceException
        Description copied from interface: ImportFolderHistoryDAO
        Stores a new history
        Specified by:
        store in interface ImportFolderHistoryDAO
        Parameters:
        history - the history to save
        document - the document the history points to
        Returns:
        true id the operation was successful
        Throws:
        com.logicaldoc.core.PersistenceException - An error in the database
      • setFolderDAO

        public void setFolderDAO​(com.logicaldoc.core.folder.FolderDAO folderDAO)
      • setUserDAO

        public void setUserDAO​(com.logicaldoc.core.security.dao.UserDAO userDAO)