Class HibernateUserHistoryDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<UserHistory>
com.logicaldoc.core.history.HibernateHistoryDAO<UserHistory>
com.logicaldoc.core.security.user.HibernateUserHistoryDAO
- All Implemented Interfaces:
- PersistentObjectDAO<UserHistory>,- UserHistoryDAO
@Repository("userHistoryDAO")
public class HibernateUserHistoryDAO
extends HibernateHistoryDAO<UserHistory>
implements UserHistoryDAO
- 
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 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:UserHistoryDAOThis method selects all histories of a given user.- Specified by:
- findByUserIdin interface- UserHistoryDAO
- Parameters:
- userId- identifier of the suer
- Returns:
- list of histories ordered by date asc
 
- 
findByUserIdAndEventDescription copied from interface:UserHistoryDAOThis method selects all histories of a given user and a given type.- Specified by:
- findByUserIdAndEventin interface- UserHistoryDAO
- Parameters:
- userId- identifier of the suer
- event- The event specification to restrict the search (optional)
- Returns:
- list of histories ordered by date asc
 
- 
createUserHistorypublic UserHistory createUserHistory(User user, UserEvent eventType, String comment, String sessionId, Client client) Description copied from interface:UserHistoryDAOCreates an user history entry- Specified by:
- createUserHistoryin interface- UserHistoryDAO
- Parameters:
- user- The user that made the operation
- eventType- 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
 
- 
cleanOldHistoriespublic void cleanOldHistories(int ttl) Description copied from interface:UserHistoryDAOThis 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- UserHistoryDAO
- Parameters:
- ttl- The maximum number of days over which the history is considered old
 
 
-