Package com.logicaldoc.core.folder
Interface FolderHistoryDAO
-
- All Superinterfaces:
PersistentObjectDAO<FolderHistory>
- All Known Implementing Classes:
HibernateFolderHistoryDAO
public interface FolderHistoryDAO extends PersistentObjectDAO<FolderHistory>
DAO forFolderHistory
handling.- Since:
- 5.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Field Summary
-
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cleanOldHistories(int ttl)
This method deletes all the user history entries oldest than the given days from now.List<FolderHistory>
findByFolderId(long folderId)
This method selects all histories of a given folder.List<FolderHistory>
findByFolderIdAndEvent(long folderId, String event, Date oldestDate)
This method selects all histories of a given folder and event occurred after a given date.List<FolderHistory>
findByPath(String pathExpression, Date oldestDate, Collection<String> events, Integer max)
This method finds all histories about a path (you can use expression)List<FolderHistory>
findByUserId(long userId)
This method selects all histories of a given user.List<FolderHistory>
findByUserIdAndEvent(long userId, String event)
This method selects all histories of a given user and related to the given event.List<FolderHistory>
findNotNotified(Integer max)
This method selects all histories not notified yet.-
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForString, store
-
-
-
-
Method Detail
-
findByUserId
List<FolderHistory> findByUserId(long userId)
This method selects all histories of a given user.- Parameters:
userId
- identifier of the user- Returns:
- list of histories ordered by date
-
findByFolderId
List<FolderHistory> findByFolderId(long folderId)
This method selects all histories of a given folder.- Parameters:
folderId
- ID of the folder- Returns:
- list of histories ordered by date
-
findByFolderIdAndEvent
List<FolderHistory> findByFolderIdAndEvent(long folderId, String event, Date oldestDate)
This method selects all histories of a given folder and event occurred after a given date.- Parameters:
folderId
- ID of the folderevent
- code of the event to searcholdestDate
- optional oldest date- Returns:
- list of histories ordered by date
-
findNotNotified
List<FolderHistory> findNotNotified(Integer max)
This method selects all histories not notified yet.- Parameters:
max
- Optional maximum number of records- Returns:
- list of histories ordered by date
-
findByUserIdAndEvent
List<FolderHistory> findByUserIdAndEvent(long userId, String event)
This method selects all histories of a given user and related to the given event.- Parameters:
userId
- The user identifierevent
- The history event- Returns:
- list of histories ordered by date
-
findByPath
List<FolderHistory> findByPath(String pathExpression, Date oldestDate, Collection<String> events, Integer max)
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 historiesevents
- Optional list of event codes to be used as filtermax
- Optional maximum number of records- Returns:
- The list of histories that matched the given criteria
-
cleanOldHistories
void cleanOldHistories(int ttl)
This method deletes all the user history entries oldest than the given days from now. Ifttl
is 0 or -1, the cancellation is not made.- Parameters:
ttl
- The maximum number of days over which the history is considered old
-
-