Class AuditDAOHibernate

All Implemented Interfaces:
AuditDao

public class AuditDAOHibernate extends HibernateDao<AuditLogEntryEntity> implements AuditDao
  • Constructor Details

    • AuditDAOHibernate

      public AuditDAOHibernate()
  • Method Details

    • add

      public void add(AuditLogChangesetEntity entry)
      Description copied from interface: AuditDao
      Persists the changeset and its entries
      Specified by:
      add in interface AuditDao
      Parameters:
      entry - the changeset to persist
    • search

      public <RESULT> List<RESULT> search(AuditLogQuery<RESULT> query)
      Description copied from interface: AuditDao
      Searches the audit log for entries matching the specified criteria
      Specified by:
      search in interface AuditDao
      Parameters:
      query - the search criteria
      Returns:
      a list of changesets with entries matching the 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 interface AuditDao
      Parameters:
      timestamp - the timestamp
      Returns:
      number of deleted entities
    • getAuditLogSize

      public long getAuditLogSize()
      Specified by:
      getAuditLogSize in interface AuditDao
      Returns:
      the amount of changesets in the audit log
    • getPersistentClass

      public Class<AuditLogEntryEntity> getPersistentClass()
      Description copied from class: HibernateDao
      All subclasses of HibernateDao must implement this method for HibernateDao.load(Serializable) to work correctly.
      Specified by:
      getPersistentClass in class HibernateDao<AuditLogEntryEntity>
      Returns:
      the entity class for this DAO
    • setAuditLogQueryTranslator

      @Autowired public void setAuditLogQueryTranslator(AuditLogQueryTranslator auditLogQueryTranslator)