Package com.logicaldoc.core.document
Interface DocumentHistoryDAO
- All Superinterfaces:
- PersistentObjectDAO<DocumentHistory>
- All Known Implementing Classes:
- HibernateDocumentHistoryDAO
DAO for 
DocumentHistory handling.- Author:
- Michael Scholz, Alessandro Gasparini - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier and TypeMethodDescriptionvoidcleanOldHistories(int ttl) This method deletes all the document history entries older than the given days from now.findByDocId(long docId) This method selects all histories of a given document.findByDocIdAndEvent(long docId, DocumentEvent event) This method selects all histories of a given document.findByFolderId(long folderId) This method selects all histories of a given folder.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, String sessionId) 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.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, 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- 
findByDocIdThis method selects all histories of a given document.- Parameters:
- docId- - ID of the document.
- Returns:
- list of histories ordered by date
- Throws:
- PersistenceException- Error in the database
 
- 
findByDocIdAndEventList<DocumentHistory> findByDocIdAndEvent(long docId, DocumentEvent event) throws PersistenceException 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
- Throws:
- PersistenceException- Error in the database
 
- 
findByUserIdThis method selects all histories of a given user.- Parameters:
- userId- identifier of the user
- Returns:
- list of histories ordered by date
- Throws:
- PersistenceException- Error in the database
 
- 
findByFolderIdThis method selects all histories of a given folder.- Parameters:
- folderId- - ID of the document.
- Returns:
- list of histories ordered by date
- Throws:
- PersistenceException- Error in the database
 
- 
findByPathList<DocumentHistory> findByPath(String pathExpression, Date oldestDate, Collection<String> events, Integer max) throws PersistenceException 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
- Throws:
- PersistenceException- Error in the database
 
- 
findNotNotifiedThis method selects all histories not notified yet.- Parameters:
- max- Optional maximum number of records
- Returns:
- list of histories ordered by date
- Throws:
- PersistenceException- Error in the database
 
- 
cleanOldHistoriesThis method deletes all the document history entries older 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
- Throws:
- PersistenceException- Error in the database
 
- 
markHistoriesAsReadMarks all the histories of a specific event as read by the specified user.- Parameters:
- event- the event name
- userId- identifier of the user
- Throws:
- PersistenceException- Error in the database
 
- 
findByUserIdAndEventList<DocumentHistory> findByUserIdAndEvent(long userId, String event, String sessionId) throws PersistenceException This method selects all histories of a given user and related to the given event.- Parameters:
- userId- The user identifier
- event- Code of the event (optional)
- sessionId- The session identifier (optional)
- Returns:
- list of histories ordered by date
- Throws:
- PersistenceException- Error in the database
 
 
-