Interface Auditor

All Superinterfaces:
Closeable, Configurable
All Known Implementing Classes:
AuditLogger

public interface Auditor extends Configurable, Closeable
An auditor is responsible for recoding the audited information. OpenJPA runtime tracks the auditable instances and invoke implementation of this interface within a transaction.
The user implementation of this interface is configurable via standard OpenJPA plug-in configuration framework.
Since:
2.2.0
Author:
Pinaki Poddar
  • Method Details

    • audit

      void audit(Broker broker, Collection<Audited> newObjects, Collection<Audited> updates, Collection<Audited> deletes)
      OpenJPA runtime will invoke this method with the given parameters within a transaction.
      Parameters:
      broker - the active persistence context.
      newObjects - the set of auditable objects being created. Can be empty, but never null.
      updates - the set of auditable objects being updated. Can be empty, but never null.
      deletes - the set of auditable objects being deleted. Can be empty, but never null.
    • isRollbackOnError

      boolean isRollbackOnError()
      Affirm if the transaction be rolled back if audit operation fails with an exception.