Package org.apache.cayenne.graph

# Class NodePropertyChangeOperation

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

All Implemented Interfaces:
  `Serializable`, `Comparable<NodeDiff>`, `GraphDiff`

public class NodePropertyChangeOperation extends NodeDiff

Since:
  1.2
See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Object`
  `newValue`
  `protected Object`
  `oldValue`
  `protected String`
  `property`

  ### Fields inherited from class org.apache.cayenne.graph.NodeDiff

  `diffId, nodeId`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NodePropertyChangeOperation(Object nodeId, String property, Object oldValue, Object newValue)`
  `NodePropertyChangeOperation(Object nodeId, String property, Object oldValue, Object newValue, int diffId)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `apply(GraphChangeHandler tracker)`
  Calls appropriate methods on the handler to "replay" this change.
  `String`
  `getProperty()`
  `boolean`
  `isNoop()`
  Returns true if both old and new value are equal.
  `void`
  `undo(GraphChangeHandler tracker)`
  Calls appropriate methods on the handler to revert this change.

  ### Methods inherited from class org.apache.cayenne.graph.NodeDiff

  `compareTo, getDiffId, getNodeId, setDiffId`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### property

    protected String property

  - ### oldValue

    protected Object oldValue

  - ### newValue

    protected Object newValue

- ## Constructor Details

  - ### NodePropertyChangeOperation

    public NodePropertyChangeOperation(Object nodeId, String property, Object oldValue, Object newValue)

  - ### NodePropertyChangeOperation

    public NodePropertyChangeOperation(Object nodeId, String property, Object oldValue, Object newValue, int diffId)

- ## Method Details

  - ### getProperty

    public String getProperty()
    Since:
      3.0

  - ### isNoop

    public boolean isNoop()
    Returns true if both old and new value are equal.
    Specified by:
      `isNoop` in interface `GraphDiff`
    Overrides:
      `isNoop` in class `NodeDiff`

  - ### apply

    public 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`
    Specified by:
      `apply` in class `NodeDiff`

  - ### undo

    public 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`
    Specified by:
      `undo` in class `NodeDiff`