Package com.logicaldoc.core.document.dao
Interface DocumentHistoryDAO
- 
- All Superinterfaces:
- PersistentObjectDAO<DocumentHistory>
 - All Known Implementing Classes:
- HibernateDocumentHistoryDAO
 
 public interface DocumentHistoryDAO extends PersistentObjectDAO<DocumentHistory> DAO forDocumentHistoryhandling.- Author:
- Michael Scholz, Alessandro Gasparini - LogicalDOC
 
- 
- 
Field Summary- 
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcleanOldHistories(int ttl)This method deletes all the document history entries oldest than the given days from now.List<DocumentHistory>findByDocId(long docId)This method selects all histories of a given document.List<DocumentHistory>findByDocIdAndEvent(long docId, String event)This method selects all histories of a given document.List<DocumentHistory>findByFolderId(long folderId)This method selects all histories of a given folder.List<DocumentHistory>findByPath(String pathExpression, Date oldestDate, Collection<String> events, Integer max)This method finds all histories about a path (you can use expression)List<DocumentHistory>findByUserId(long userId)This method selects all histories of a given user.List<DocumentHistory>findByUserIdAndEvent(long userId, String event, String sessionId)This method selects all histories of a given user and related to the given event.List<DocumentHistory>findNotNotified(Integer max)This method selects all histories not notified yet.voidmarkHistoriesAsRead(String event, long userId)Marks all the histories of a specific event as read by the specified user.- 
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAObulkUpdate, 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- 
findByDocIdList<DocumentHistory> findByDocId(long docId) This method selects all histories of a given document.- Parameters:
- docId- - ID of the document.
- Returns:
- list of histories ordered by date
 
 - 
findByDocIdAndEventList<DocumentHistory> findByDocIdAndEvent(long docId, String event) This method selects all histories of a given document.- Parameters:
- docId- - ID of the document.
- event- - Optional event code
- Returns:
- list of histories ordered by date
 
 - 
findByUserIdList<DocumentHistory> 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
 
 - 
findByFolderIdList<DocumentHistory> findByFolderId(long folderId) This method selects all histories of a given folder.- Parameters:
- folderId- - ID of the document.
- Returns:
- list of histories ordered by date
 
 - 
findByPathList<DocumentHistory> 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 histories
- events- events Optional list of event codes to be used as filter
- max- Optional maximum number of records
- Returns:
- list of histories ordered by date asc
 
 - 
findNotNotifiedList<DocumentHistory> 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
 
 - 
cleanOldHistoriesvoid cleanOldHistories(int ttl) This method deletes all the document history entries oldest than the given days from now. Ifttlis 0 or -1, the deletion is not made.- Parameters:
- ttl- The maximum number of days over which the history is considered old
 
 - 
markHistoriesAsReadvoid markHistoriesAsRead(String event, long userId) Marks all the histories of a specific event as read by the specified user.- Parameters:
- event- the event name
- userId- identifier of the user
 
 - 
findByUserIdAndEventList<DocumentHistory> findByUserIdAndEvent(long userId, String event, String sessionId) This method selects all histories of a given user and related to the given event.- Parameters:
- userId- The user identifier
- sessionId- The session identifier (optional)
- event- Code of the event (optional)
- Returns:
- list of histories ordered by date
 
 
- 
 
-