org.apache.cayenne.lifecycle.changeset
Class ChangeSetFilter
java.lang.Object
org.apache.cayenne.lifecycle.changeset.ChangeSetFilter
- All Implemented Interfaces:
- DataChannelFilter
public class ChangeSetFilter
- extends Object
- implements DataChannelFilter
A DataChannelFilter that provides interested parties with a thread-local access
to the current commit changeset. It will only return a non-null change set when commit
within the scope of the filter
onSync(ObjectContext, GraphDiff, int, DataChannelFilterChain) method. The
filter is intended to be used by pre-commit and post-commit listeners.
- Since:
- 3.1
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChangeSetFilter
public ChangeSetFilter()
preCommitChangeSet
public static ChangeSet preCommitChangeSet()
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
Copyright © 2001-2013 Apache Cayenne. All Rights Reserved.