public class HibernateHistoryDAO extends HibernatePersistentObjectDAO<History> implements HistoryDAO
HistoryDAO
entityClass, 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, 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<History> findByDocId(long docId)
HistoryDAO
findByDocId
in interface HistoryDAO
docId
- - ID of the document.HistoryDAO.findByDocId(long)
public List<History> findByUserId(long userId)
HistoryDAO
findByUserId
in interface HistoryDAO
HistoryDAO.findByUserId(long)
public List<History> findByFolderId(long folderId)
HistoryDAO
findByFolderId
in interface HistoryDAO
folderId
- - ID of the document.HistoryDAO.findByFolderId(long)
public List<History> findNotNotified(Integer max)
HistoryDAO
findNotNotified
in interface HistoryDAO
public void cleanOldHistories(int ttl)
HistoryDAO
ttl
is 0 or -1, the cancellation is
not made.cleanOldHistories
in interface HistoryDAO
ttl
- The maximum number of days over which the history is
considered oldUserHistoryDAO.cleanOldHistories(int)
public List<History> findByUserIdAndEvent(long userId, String event, String sessionId)
HistoryDAO
findByUserIdAndEvent
in interface HistoryDAO
userId
- The user identifierevent
- The string represtation of history event (optional)sessionId
- The session identifier (optional)public boolean store(History entity)
PersistentObjectDAO
store
in interface PersistentObjectDAO<History>
store
in class HibernatePersistentObjectDAO<History>
entity
- entity to be stored.public boolean isEnabled()
HistoryDAO
isEnabled
in interface HistoryDAO
public void setConfig(ContextProperties config)
public List<History> findByPath(String pathExpression, Date olderDate, Collection<String> events, Integer max)
HistoryDAO
findByPath
in interface HistoryDAO
pathExpression
- 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.