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
-
-
Field Summary
-
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
-
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.UserHistory
createUserHistory(User user, String event, String comment, String sessionId, Client client)
Creates an user history entryList<UserHistory>
findByUserId(long userId)
This method selects all histories of a given user.List<UserHistory>
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.PersistentObjectDAO
bulkUpdate, 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
-
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 asc
-
findByUserIdAndEvent
List<UserHistory> findByUserIdAndEvent(long userId, String event)
This method selects all histories of a given user and a given type.- Parameters:
userId
- identifier of the suerevent
- The event specification to restrict the search (optional)- Returns:
- list of histories ordered by date asc
-
createUserHistory
UserHistory createUserHistory(User user, String event, String comment, String sessionId, Client client)
Creates an user history entry- Parameters:
user
- The user that made the operationevent
- The event specificationcomment
- The comment provided by the userclient
- The client connected to LogicalDOCsessionId
- The user session id- Returns:
- the created history
-
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
-
-