Package com.atlassian.crowd.dao.audit
Class AuditDAOHibernate
java.lang.Object
com.atlassian.crowd.util.persistence.hibernate.StatelessDao
com.atlassian.crowd.util.persistence.hibernate.HibernateDao<AuditLogEntryEntity>
com.atlassian.crowd.dao.audit.AuditDAOHibernate
- All Implemented Interfaces:
AuditDao
-
Field Summary
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSource
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.StatelessDao
sessionFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(AuditLogChangesetEntity entry) Persists the changeset and its entrieslong
All subclasses of HibernateDao must implement this method forHibernateDao.load(Serializable)
to work correctly.int
removeChangesetsOlderThan
(long timestamp) Removes the audit log entries older than specified timestamp<RESULT> List<RESULT>
search
(AuditLogQuery<RESULT> query) Searches the audit log for entries matching the specified criteriavoid
setAuditLogQueryTranslator
(AuditLogQueryTranslator auditLogQueryTranslator) Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
createDeleteQuery, createDeleteQuery, createQuery, createQuery, executeHQLQuery, findAllInternal, findByProperties, findByPropertiesOptional, findByProperty, findByProperty, findByPropertyOptional, findByPropertyOrThrow, getCountByProperties, load, load, loadOptional, loadReference, loadReference, remove, removeByIdIfPresent, save, saveOrUpdate, session, setBatchFinder, setBatchProcessor, setClock, setStatelessSessionBatchProcessor, toPredicates, update
Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.StatelessDao
setSessionFactory, withStatelessSession
-
Constructor Details
-
AuditDAOHibernate
public AuditDAOHibernate()
-
-
Method Details
-
add
Description copied from interface:AuditDao
Persists the changeset and its entries -
search
Description copied from interface:AuditDao
Searches the audit log for entries matching the specified criteria -
removeChangesetsOlderThan
public int removeChangesetsOlderThan(long timestamp) Description copied from interface:AuditDao
Removes the audit log entries older than specified timestamp- Specified by:
removeChangesetsOlderThan
in interfaceAuditDao
- Parameters:
timestamp
- the timestamp- Returns:
- number of deleted entities
-
getAuditLogSize
public long getAuditLogSize()- Specified by:
getAuditLogSize
in interfaceAuditDao
- Returns:
- the amount of changesets in the audit log
-
getPersistentClass
Description copied from class:HibernateDao
All subclasses of HibernateDao must implement this method forHibernateDao.load(Serializable)
to work correctly.- Specified by:
getPersistentClass
in classHibernateDao<AuditLogEntryEntity>
- Returns:
- the entity class for this DAO
-
setAuditLogQueryTranslator
-