use of org.apache.cayenne.access.ObjectStore.SnapshotEventDecorator in project cayenne by apache.
the class DataContextMergeHandler method graphChanged.
// *** GraphEventListener methods
@Override
public void graphChanged(GraphEvent event) {
// parent received external change
if (shouldProcessEvent(event)) {
// temp kludge - see TODO in ObjectStore.snapshotsChanged(..)
GraphDiff diff = event.getDiff();
if (diff instanceof SnapshotEventDecorator) {
SnapshotEvent decoratedEvent = ((SnapshotEventDecorator) diff).getEvent();
context.getObjectStore().processSnapshotEvent(decoratedEvent);
} else {
synchronized (context.getObjectStore()) {
diff.apply(this);
}
}
// repost channel change event for our own children
context.fireDataChannelChanged(event.getPostedBy(), event.getDiff());
}
}
Aggregations