Package com.logicaldoc.importfolder
Class HibernateImportFolderHistoryDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<ImportFolderHistory>
com.logicaldoc.core.history.HibernateHistoryDAO<ImportFolderHistory>
com.logicaldoc.importfolder.HibernateImportFolderHistoryDAO
- All Implemented Interfaces:
com.logicaldoc.core.PersistentObjectDAO<ImportFolderHistory>
,ImportFolderHistoryDAO
public class HibernateImportFolderHistoryDAO
extends com.logicaldoc.core.history.HibernateHistoryDAO<ImportFolderHistory>
implements ImportFolderHistoryDAO
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanOldHistories
(int ttl) This method deletes all the import folder history entries oldest than the given days from now.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.user.UserDAO userDAO) void
store
(ImportFolderHistory history) void
store
(ImportFolderHistory history, com.logicaldoc.core.document.Document document) Stores a new historyMethods 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
-
Method Details
-
setFolderDAO
public void setFolderDAO(com.logicaldoc.core.folder.FolderDAO folderDAO) -
setUserDAO
public void setUserDAO(com.logicaldoc.core.security.user.UserDAO userDAO) -
findByImportFolderId
public List<ImportFolderHistory> findByImportFolderId(long importFolderId, String event) throws com.logicaldoc.core.PersistenceException Description copied from interface:ImportFolderHistoryDAO
This method selects all histories of a given import folder.- Specified by:
findByImportFolderId
in interfaceImportFolderHistoryDAO
- Parameters:
importFolderId
- Identifier of the import folderevent
- Optional selector of the event- Returns:
- list of histories ordered by last modified date
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the database
-
cleanOldHistories
public void cleanOldHistories(int ttl) throws com.logicaldoc.core.PersistenceException Description copied from interface:ImportFolderHistoryDAO
This method deletes all the import folder history entries oldest than the given days from now. Ifttl
is 0 or -1, the cancellation is not made.- Specified by:
cleanOldHistories
in interfaceImportFolderHistoryDAO
- Parameters:
ttl
- The maximum number of days over which the history is considered old- Throws:
com.logicaldoc.core.PersistenceException
- Error in the database
-
store
- Specified by:
store
in interfacecom.logicaldoc.core.PersistentObjectDAO<ImportFolderHistory>
- Overrides:
store
in classcom.logicaldoc.core.history.HibernateHistoryDAO<ImportFolderHistory>
- Throws:
com.logicaldoc.core.PersistenceException
-
store
public void 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 interfaceImportFolderHistoryDAO
- Parameters:
history
- the history to savedocument
- the document the history points to- Throws:
com.logicaldoc.core.PersistenceException
- An error in the database
-