public abstract class NodeDiff extends Object implements GraphDiff, Comparable<NodeDiff>
Modifier and Type | Field and Description |
---|---|
protected int |
diffId |
protected Object |
nodeId |
Constructor and Description |
---|
NodeDiff(Object nodeId) |
NodeDiff(Object nodeId,
int diffId) |
Modifier and Type | Method and Description |
---|---|
abstract void |
apply(GraphChangeHandler tracker)
Calls appropriate methods on the handler to "replay" this change.
|
int |
compareTo(NodeDiff 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.
|
protected int diffId
protected Object nodeId
public NodeDiff(Object nodeId)
public NodeDiff(Object nodeId, int diffId)
public boolean isNoop()
GraphDiff
public abstract void apply(GraphChangeHandler tracker)
GraphDiff
public abstract void undo(GraphChangeHandler tracker)
GraphDiff
public Object getNodeId()
public int getDiffId()
public void setDiffId(int diffId)
public int compareTo(NodeDiff o)
compareTo
in interface Comparable<NodeDiff>
Copyright © 2001–2014 Apache Cayenne. All rights reserved.