public class AuditableFilter extends Object implements DataChannelFilter
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.| Modifier and Type | Field and Description |
|---|---|
protected EntityResolver |
entityResolver |
protected AuditableProcessor |
processor |
| Constructor and Description |
|---|
AuditableFilter(AuditableProcessor processor) |
AuditableFilter(EntityResolver entityResolver,
AuditableProcessor processor)
Deprecated.
since 3.1 use
AuditableFilter(AuditableProcessor)
constructor - EntityResolver will be initialized in 'init'. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupPostSync()
A method called at the end of every
onSync(ObjectContext, GraphDiff, int, DataChannelFilterChain)
invocation. |
protected Persistent |
getParent(Persistent object) |
void |
init(DataChannel channel) |
protected boolean |
isAuditableUpdate(Object object,
boolean child) |
QueryResponse |
onQuery(ObjectContext originatingContext,
Query query,
DataChannelFilterChain filterChain) |
GraphDiff |
onSync(ObjectContext originatingContext,
GraphDiff changes,
int syncType,
DataChannelFilterChain filterChain) |
protected AuditableProcessor processor
protected EntityResolver entityResolver
public AuditableFilter(AuditableProcessor processor)
@Deprecated public AuditableFilter(EntityResolver entityResolver, AuditableProcessor processor)
AuditableFilter(AuditableProcessor)
constructor - EntityResolver will be initialized in 'init'.public void init(DataChannel channel)
init in interface DataChannelFilterpublic QueryResponse onQuery(ObjectContext originatingContext, Query query, DataChannelFilterChain filterChain)
onQuery in interface DataChannelFilterpublic GraphDiff onSync(ObjectContext originatingContext, GraphDiff changes, int syncType, DataChannelFilterChain filterChain)
onSync in interface DataChannelFilterprotected void cleanupPostSync()
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.protected Persistent getParent(Persistent object)
protected boolean isAuditableUpdate(Object object, boolean child)
Copyright © 2001–2015 Apache Cayenne. All rights reserved.