org.apache.cayenne.lifecycle.audit
Class AuditableFilter
java.lang.Object
org.apache.cayenne.lifecycle.audit.AuditableFilter
- All Implemented Interfaces:
- DataChannelFilter
public class AuditableFilter
- extends Object
- implements DataChannelFilter
A DataChannelFilter that enables audit of entities annotated with
Auditable and AuditableChild. Note that this filter relies on
ChangeSetFilter presence in the DataDomain filter chain to be able to
analyze ignored properties.
- Since:
- 3.1
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
processor
protected AuditableProcessor processor
entityResolver
protected EntityResolver entityResolver
AuditableFilter
public AuditableFilter(EntityResolver entityResolver,
AuditableProcessor processor)
init
public void init(DataChannel channel)
- Specified by:
init in interface DataChannelFilter
onQuery
public QueryResponse onQuery(ObjectContext originatingContext,
Query query,
DataChannelFilterChain filterChain)
- Specified by:
onQuery in interface DataChannelFilter
onSync
public GraphDiff onSync(ObjectContext originatingContext,
GraphDiff changes,
int syncType,
DataChannelFilterChain filterChain)
- Specified by:
onSync in interface DataChannelFilter
cleanupPostSync
protected void cleanupPostSync()
- A method called at the end of every
onSync(ObjectContext, GraphDiff, int, DataChannelFilterChain)
invocation. This implementation uses it for cleaning up thread-local
state of the filter. Subclasses may override it to do their own cleanup,
and are expected to call super.
getParent
protected Persistent getParent(Persistent object)
isAuditableUpdate
protected boolean isAuditableUpdate(Object object,
boolean child)
Copyright © 2001-2013 Apache Cayenne. All Rights Reserved.