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, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bulkUpdate, delete, deleteAll, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet
public List<UserHistory> findByUserId(long userId)
UserHistoryDAO
findByUserId
in interface UserHistoryDAO
UserHistoryDAO.findByUserId(long)
public void createUserHistory(User user, String eventType, String comment, String sessionId)
UserHistoryDAO
createUserHistory
in interface UserHistoryDAO
user
- 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)
UserHistoryDAO
ttl
is 0 or -1, the cancellation is not
made.cleanOldHistories
in interface UserHistoryDAO
ttl
- The maximum number of days over which the history is
considered oldUserHistoryDAO.cleanOldHistories(int)
public boolean store(UserHistory entity)
PersistentObjectDAO
store
in interface PersistentObjectDAO<UserHistory>
store
in class HibernatePersistentObjectDAO<UserHistory>
entity
- entity to be stored.public boolean isEnabled()
UserHistoryDAO
isEnabled
in interface UserHistoryDAO
public void setConfig(ContextProperties config)
Copyright © 2008-2014 Logical Objects. All Rights Reserved.