public class HibernateUserHistoryDAO extends HibernatePersistentObjectDAO<UserHistory> implements UserHistoryDAO
entityClass, log, sessionFactory| Modifier and Type | Method and 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 sessionId)
Creates an user history entry
|
List<UserHistory> |
findByUserId(long userId)
This method selects all histories of a given user.
|
boolean |
isEnabled()
Checks if the histories recording is enabled
|
void |
setConfig(ContextProperties config) |
boolean |
store(UserHistory entity)
This method persists the entity object.
|
bulkUpdate, delete, deleteAll, evict, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, flush, getConnection, getCurrentSession, getDbms, getSessionFactory, initialize, isHsql, isMySQL, isOracle, isSqlServer, jdbcUpdate, jdbcUpdate, merge, prepareQuery, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet, refresh, saveOrUpdate, setSessionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbulkUpdate, delete, deleteAll, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSetpublic List<UserHistory> findByUserId(long userId)
UserHistoryDAOfindByUserId in interface UserHistoryDAOUserHistoryDAO.findByUserId(long)public void createUserHistory(User user, String eventType, String comment, String sessionId)
UserHistoryDAOcreateUserHistory in interface UserHistoryDAOuser - The user that made the operationeventType - The event typecomment - The comment provided by the usersessionId - The user session idUserHistoryDAO.createUserHistory(com.logicaldoc.core.security.User,
java.lang.String, java.lang.String, java.lang.String)public void cleanOldHistories(int ttl)
UserHistoryDAOttl is 0 or -1, the cancellation is not
made.cleanOldHistories in interface UserHistoryDAOttl - The maximum number of days over which the history is
considered oldUserHistoryDAO.cleanOldHistories(int)public boolean store(UserHistory entity)
PersistentObjectDAOstore in interface PersistentObjectDAO<UserHistory>store in class HibernatePersistentObjectDAO<UserHistory>entity - entity to be stored.public boolean isEnabled()
UserHistoryDAOisEnabled in interface UserHistoryDAOpublic void setConfig(ContextProperties config)
Copyright © 2008-2014 Logical Objects. All Rights Reserved.