Package org.apache.cayenne.graph
Class CompoundDiff
java.lang.Object
org.apache.cayenne.graph.CompoundDiff
- All Implemented Interfaces:
- Serializable,- GraphDiff
public class CompoundDiff extends Object implements GraphDiff
A GraphDiff that is a list of other GraphDiffs.
- Since:
- 1.2
- See Also:
- Serialized Form
- 
Field Summary
- 
Constructor SummaryConstructors Constructor Description CompoundDiff()Creates an empty CompoundDiff instance.CompoundDiff(List<GraphDiff> diffs)Creates CompoundDiff instance.
- 
Method SummaryModifier and Type Method Description voidadd(GraphDiff diff)voidaddAll(Collection<? extends GraphDiff> diffs)voidapply(GraphChangeHandler tracker)Iterates over diffs list, calling "apply" on each individual diff.List<GraphDiff>getDiffs()booleanisNoop()Returns true if this diff has no other diffs or if all of its diffs are noops.voidundo(GraphChangeHandler tracker)Iterates over diffs list in reverse order, calling "apply" on each individual diff.
- 
Field Details- 
diffs
 
- 
- 
Constructor Details- 
CompoundDiffpublic CompoundDiff()Creates an empty CompoundDiff instance.
- 
CompoundDiffCreates CompoundDiff instance. Note that a List is not cloned in this constructor, so subsequent calls to add and addAll would modify the original list.
 
- 
- 
Method Details- 
isNooppublic boolean isNoop()Returns true if this diff has no other diffs or if all of its diffs are noops.
- 
getDiffs
- 
add
- 
addAll
- 
applyIterates over diffs list, calling "apply" on each individual diff.
- 
undoIterates over diffs list in reverse order, calling "apply" on each individual diff.
 
-