Package com.logicaldoc.core.security.dao
Interface UserHistoryDAO
-
- All Superinterfaces:
PersistentObjectDAO<UserHistory>
- All Known Implementing Classes:
HibernateUserHistoryDAO
public interface UserHistoryDAO extends PersistentObjectDAO<UserHistory>
DAO forUserHistory
handling.- Since:
- 5.0
- Author:
- Matteo Caruso - LogicalDOC
-
-
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.void
createUserHistory(User user, String eventType, String comment, String ip, String sessionId)
Creates an user history entryList<UserHistory>
findByUserId(long userId)
This method selects all histories of a given user.-
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, store
-
-
-
-
Method Detail
-
findByUserId
List<UserHistory> findByUserId(long userId)
This method selects all histories of a given user.- Parameters:
userId
- identifier of the suer- Returns:
- list of histories ordered by date
-
createUserHistory
void createUserHistory(User user, String eventType, String comment, String ip, String sessionId)
Creates an user history entry- Parameters:
user
- The user that made the operationeventType
- The event typecomment
- The comment provided by the userip
- The remote IPsessionId
- The user session id
-
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
-
-