|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.graph.NodeDiff
public abstract class NodeDiff
An abstract superclass of operations on individual nodes and arcs in a digraph.
Field Summary | |
---|---|
protected int |
diffId
|
protected Object |
nodeId
|
Constructor Summary | |
---|---|
NodeDiff(Object nodeId)
|
|
NodeDiff(Object nodeId,
int diffId)
|
Method Summary | |
---|---|
abstract void |
apply(GraphChangeHandler tracker)
Calls appropriate methods on the handler to "replay" this change. |
int |
compareTo(Object o)
Implements a Comparable interface method to compare based on diffId property. |
int |
getDiffId()
Returns an id of this diff that can be used for various purposes, such as identifying the order of the diff in a sequence. |
Object |
getNodeId()
|
boolean |
isNoop()
Returns true if this diff is simply a placeholder and does not perform any actual operation. |
void |
setDiffId(int diffId)
Sets an id of this diff that can be used for various purposes, such as identifying the order of the diff in a sequence. |
abstract void |
undo(GraphChangeHandler tracker)
Calls appropriate methods on the handler to revert this change. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int diffId
protected Object nodeId
Constructor Detail |
---|
public NodeDiff(Object nodeId)
public NodeDiff(Object nodeId, int diffId)
Method Detail |
---|
public boolean isNoop()
GraphDiff
isNoop
in interface GraphDiff
public abstract void apply(GraphChangeHandler tracker)
GraphDiff
apply
in interface GraphDiff
public abstract void undo(GraphChangeHandler tracker)
GraphDiff
undo
in interface GraphDiff
public Object getNodeId()
public int getDiffId()
public void setDiffId(int diffId)
public int compareTo(Object o)
compareTo
in interface Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |