private void processChange(GraphDiff diff) { changeLog.addOperation(diff); if (changeEventsEnabled) { context.fireDataChannelChanged(context, diff); } }
void repostAfterMerge(GraphEvent originalEvent) { // though the subject is CHANGE, "merge" events are really lifecycle. if (context.isLifecycleEventsEnabled()) { context.fireDataChannelChanged(originalEvent.getSource(), originalEvent.getDiff()); } }
@Override protected GraphDiff onContextFlush(ObjectContext originatingContext, GraphDiff changes, boolean cascade) { boolean childContext = this != originatingContext && changes != null; if (childContext) { // PropertyChangeProcessingStrategy oldStrategy = // getPropertyChangeProcessingStrategy(); // setPropertyChangeProcessingStrategy(PropertyChangeProcessingStrategy.RECORD); try { changes.apply(new CayenneContextChildDiffLoader(this)); } finally { // setPropertyChangeProcessingStrategy(oldStrategy); } fireDataChannelChanged(originatingContext, changes); } return (cascade) ? doCommitChanges(true) : new CompoundDiff(); }