Package com.logicaldoc.core.folder
Class HibernateFolderHistoryDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<FolderHistory>
com.logicaldoc.core.history.HibernateHistoryDAO<FolderHistory>
com.logicaldoc.core.folder.HibernateFolderHistoryDAO
- All Implemented Interfaces:
- FolderHistoryDAO,- PersistentObjectDAO<FolderHistory>
@Repository("folderHistoryDAO")
public class HibernateFolderHistoryDAO
extends HibernateHistoryDAO<FolderHistory>
implements FolderHistoryDAO
Hibernate implementation of 
FolderHistoryDAO- Since:
- 6.4
- Author:
- Marco Meschieri - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier and TypeMethodDescriptionvoidcleanOldHistories(int ttl) This method deletes all the user history entries oldest than the given days from now.findByFolderId(long folderId) This method selects all histories of a given folder.findByFolderIdAndEvent(long folderId, String event, Date oldestDate) This method selects all histories of a given folder and event occurred after a given date.findByPath(String pathExpression, Date oldestDate, Collection<String> events, Integer max) This method finds all histories about a path (you can use expression)findByUserId(long userId) This method selects all histories of a given user.findByUserIdAndEvent(long userId, String event) This method selects all histories of a given user and related to the given event.findNotNotified(Integer max) This method selects all histories not notified yet.Methods inherited from class com.logicaldoc.core.history.HibernateHistoryDAOstoreMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAObulkUpdate, delete, delete, deleteAll, deleteAll, evict, evict, 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, queryForString, setSessionFactoryMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.PersistentObjectDAObulkUpdate, delete, delete, deleteAll, deleteAll, evict, evict, 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, queryForString, store
- 
Method Details- 
findByUserIdDescription copied from interface:FolderHistoryDAOThis method selects all histories of a given user.- Specified by:
- findByUserIdin interface- FolderHistoryDAO
- Parameters:
- userId- identifier of the user
- Returns:
- list of histories ordered by date
- Throws:
- PersistenceException- Error in the database
 
- 
findByFolderIdDescription copied from interface:FolderHistoryDAOThis method selects all histories of a given folder.- Specified by:
- findByFolderIdin interface- FolderHistoryDAO
- Parameters:
- folderId- ID of the folder
- Returns:
- list of histories ordered by date
- Throws:
- PersistenceException- Error in the database
 
- 
findNotNotifiedDescription copied from interface:FolderHistoryDAOThis method selects all histories not notified yet.- Specified by:
- findNotNotifiedin interface- FolderHistoryDAO
- Parameters:
- max- Optional maximum number of records
- Returns:
- list of histories ordered by date
- Throws:
- PersistenceException- Error in the database
 
- 
cleanOldHistoriesDescription copied from interface:FolderHistoryDAOThis method deletes all the user history entries oldest than the given days from now. Ifttlis 0 or -1, the cancellation is not made.- Specified by:
- cleanOldHistoriesin interface- FolderHistoryDAO
- Parameters:
- ttl- The maximum number of days over which the history is considered old
- Throws:
- PersistenceException- Error in the database
 
- 
findByUserIdAndEventpublic List<FolderHistory> findByUserIdAndEvent(long userId, String event) throws PersistenceException Description copied from interface:FolderHistoryDAOThis method selects all histories of a given user and related to the given event.- Specified by:
- findByUserIdAndEventin interface- FolderHistoryDAO
- Parameters:
- userId- The user identifier
- event- The history event
- Returns:
- list of histories ordered by date
- Throws:
- PersistenceException- Error in the database
 
- 
findByPathpublic List<FolderHistory> findByPath(String pathExpression, Date oldestDate, Collection<String> events, Integer max) throws PersistenceException Description copied from interface:FolderHistoryDAOThis method finds all histories about a path (you can use expression)- Specified by:
- findByPathin interface- FolderHistoryDAO
- 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
 
- 
findByFolderIdAndEventpublic List<FolderHistory> findByFolderIdAndEvent(long folderId, String event, Date oldestDate) throws PersistenceException Description copied from interface:FolderHistoryDAOThis method selects all histories of a given folder and event occurred after a given date.- Specified by:
- findByFolderIdAndEventin interface- FolderHistoryDAO
- 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
 
 
-