Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.graph
Class NodeDiff

    java.lang.Object
      org.apache.cayenne.graph.NodeDiff

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable, GraphDiff

Direct Known Subclasses:
  ArcCreateOperation, ArcDeleteOperation, NodeCreateOperation, NodeDeleteOperation, NodeIdChangeOperation, NodePropertyChangeOperation

    public abstract class NodeDiff

extends java.lang.Object
implements GraphDiff, java.lang.Comparable

An abstract superclass of operations on individual nodes and arcs in a digraph.

Since:
  1.2
Author:
  Andrus Adamchik
See Also:
  Serialized Form

Field Summary
`protected int` | `diffId`
`protected java.lang.Object` | `nodeId`

Constructor Summary
`NodeDiff(java.lang.Object nodeId)`
`NodeDiff(java.lang.Object nodeId, int diffId)`

Method Summary
`abstract void` | `apply(GraphChangeHandler tracker)` Calls appropriate methods on the handler to "replay" this change.
`int` | `compareTo(java.lang.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.
`java.lang.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

### diffId

    protected int diffId

### nodeId

    protected java.lang.Object nodeId

Constructor Detail

### NodeDiff

    public NodeDiff(java.lang.Object nodeId)

### NodeDiff

    public NodeDiff(java.lang.Object nodeId,
                    int diffId)

Method Detail

### isNoop

    public boolean isNoop()

  Description copied from interface: `GraphDiff`
  Returns true if this diff is simply a placeholder and does not perform any actual operation.

  Specified by:
    `isNoop` in interface `GraphDiff`

### apply

    public abstract void apply(GraphChangeHandler tracker)

  Description copied from interface: `GraphDiff`
  Calls appropriate methods on the handler to "replay" this change.

  Specified by:
    `apply` in interface `GraphDiff`

### undo

    public abstract void undo(GraphChangeHandler tracker)

  Description copied from interface: `GraphDiff`
  Calls appropriate methods on the handler to revert this change.

  Specified by:
    `undo` in interface `GraphDiff`

### getNodeId

    public java.lang.Object getNodeId()

### getDiffId

    public 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.

### setDiffId

    public 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.

### compareTo

    public int compareTo(java.lang.Object o)

  Implements a Comparable interface method to compare based on diffId property.

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.