Package org.apache.openjpa.audit
Interface Auditor
- All Superinterfaces:
Closeable
,Configurable
- All Known Implementing Classes:
AuditLogger
An auditor is responsible for recoding the audited information.
OpenJPA runtime tracks the
The user implementation of this interface is configurable via standard OpenJPA plug-in configuration framework.
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 Summary
Modifier and TypeMethodDescriptionvoid
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.boolean
Affirm if the transaction be rolled back ifaudit
operation fails with an exception.Methods inherited from interface org.apache.openjpa.lib.conf.Configurable
endConfiguration, setConfiguration, startConfiguration
-
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 ifaudit
operation fails with an exception.
-