public class HibernateHistoryDAO extends HibernatePersistentObjectDAO<History> implements HistoryDAO
HistoryDAOentityClass, log, sessionFactory| Modifier and Type | Method and Description |
|---|---|
void |
cleanOldHistories(int ttl)
This method deletes all the document history entries oldest than the
given days from now.
|
List<History> |
findByDocId(long docId)
This method selects all histories of a given document.
|
List<History> |
findByFolderId(long folderId)
This method selects all histories of a given folder.
|
List<History> |
findByPath(String pathExpression,
Date olderDate,
Collection<String> events,
Integer max)
This method finds all histories about a path (you can use expression)
|
List<History> |
findByUserId(long userId)
This method selects all histories of a given user.
|
List<History> |
findByUserIdAndEvent(long userId,
String event,
String sessionId)
This method selects all histories of a given user and related to the
given event.
|
List<History> |
findNotNotified(Integer max)
This method selects all histories not notified yet.
|
boolean |
isEnabled()
Checks if the histories recording is enabled
|
void |
setConfig(ContextProperties config) |
boolean |
store(History 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<History> findByDocId(long docId)
HistoryDAOfindByDocId in interface HistoryDAOdocId - - ID of the document.HistoryDAO.findByDocId(long)public List<History> findByUserId(long userId)
HistoryDAOfindByUserId in interface HistoryDAOHistoryDAO.findByUserId(long)public List<History> findByFolderId(long folderId)
HistoryDAOfindByFolderId in interface HistoryDAOfolderId - - ID of the document.HistoryDAO.findByFolderId(long)public List<History> findNotNotified(Integer max)
HistoryDAOfindNotNotified in interface HistoryDAOpublic void cleanOldHistories(int ttl)
HistoryDAOttl is 0 or -1, the cancellation is
not made.cleanOldHistories in interface HistoryDAOttl - The maximum number of days over which the history is
considered oldUserHistoryDAO.cleanOldHistories(int)public List<History> findByUserIdAndEvent(long userId, String event, String sessionId)
HistoryDAOfindByUserIdAndEvent in interface HistoryDAOuserId - The user identifierevent - The string represtation of history event (optional)sessionId - The session identifier (optional)public boolean store(History entity)
PersistentObjectDAOstore in interface PersistentObjectDAO<History>store in class HibernatePersistentObjectDAO<History>entity - entity to be stored.public boolean isEnabled()
HistoryDAOisEnabled in interface HistoryDAOpublic void setConfig(ContextProperties config)
public List<History> findByPath(String pathExpression, Date olderDate, Collection<String> events, Integer max)
HistoryDAOfindByPath in interface HistoryDAOpathExpression - The path expression (like /Default/acme%)olderDate - The older date for the retrieved historiesmax - Optional maximum number of recordsCopyright © 2008-2014 Logical Objects. All Rights Reserved.