Interface UserHistoryDAO
- All Superinterfaces:
- PersistentObjectDAO<UserHistory>
- All Known Implementing Classes:
- HibernateUserHistoryDAO
DAO for 
UserHistory handling.- Since:
- 5.0
- Author:
- Matteo Caruso - 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.Creates an user history entryfindByUserId(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 a given type.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- 
findByUserIdThis method selects all histories of a given user.- Parameters:
- userId- identifier of the suer
- Returns:
- list of histories ordered by date asc
 
- 
findByUserIdAndEventThis method selects all histories of a given user and a given type.- Parameters:
- userId- identifier of the suer
- event- The event specification to restrict the search (optional)
- Returns:
- list of histories ordered by date asc
 
- 
createUserHistoryUserHistory createUserHistory(User user, UserEvent event, String comment, String sessionId, Client client) Creates an user history entry- Parameters:
- user- The user that made the operation
- event- The event specification
- comment- The comment provided by the user
- sessionId- The user session id
- client- The client connected to LogicalDOC
- Returns:
- the created history
 
- 
cleanOldHistoriesvoid cleanOldHistories(int ttl) This method deletes all the user history entries oldest than the given days from now. Ifttlis 0 or -1, the cancellation is not made.- Parameters:
- ttl- The maximum number of days over which the history is considered old
 
 
-