public class HibernateFolderHistoryDAO extends HibernatePersistentObjectDAO<FolderHistory> implements FolderHistoryDAO
FolderHistoryDAO
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.
|
List<FolderHistory> |
findByFolderId(long folderId)
This method selects all histories of a given folder.
|
List<FolderHistory> |
findByPath(String pathExpression,
Date olderDate,
Collection<String> events,
Integer max)
This method finds all histories about a path (you can use expression)
|
List<FolderHistory> |
findByUserId(long userId)
This method selects all histories of a given user.
|
List<FolderHistory> |
findByUserIdAndEvent(long userId,
String event)
This method selects all histories of a given user and related to the
given event.
|
List<FolderHistory> |
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(FolderHistory 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<FolderHistory> findByUserId(long userId)
FolderHistoryDAO
findByUserId
in interface FolderHistoryDAO
public List<FolderHistory> findByFolderId(long folderId)
FolderHistoryDAO
findByFolderId
in interface FolderHistoryDAO
folderId
- - ID of the document.public List<FolderHistory> findNotNotified(Integer max)
FolderHistoryDAO
findNotNotified
in interface FolderHistoryDAO
public void cleanOldHistories(int ttl)
FolderHistoryDAO
ttl
is 0 or -1, the cancellation is not
made.cleanOldHistories
in interface FolderHistoryDAO
ttl
- The maximum number of days over which the history is
considered oldpublic List<FolderHistory> findByUserIdAndEvent(long userId, String event)
FolderHistoryDAO
findByUserIdAndEvent
in interface FolderHistoryDAO
userId
- The user identifierevent
- The history eventpublic boolean store(FolderHistory entity)
PersistentObjectDAO
store
in interface PersistentObjectDAO<FolderHistory>
store
in class HibernatePersistentObjectDAO<FolderHistory>
entity
- entity to be stored.public List<FolderHistory> findByPath(String pathExpression, Date olderDate, Collection<String> events, Integer max)
FolderHistoryDAO
findByPath
in interface FolderHistoryDAO
pathExpression
- The path expression (like /Default/acme%)olderDate
- The older date for the retrieved historiesmax
- Optional maximum number of recordspublic boolean isEnabled()
FolderHistoryDAO
isEnabled
in interface FolderHistoryDAO
public void setConfig(ContextProperties config)
Copyright © 2008-2014 Logical Objects. All Rights Reserved.