Package org.apache.cayenne.access

# Class ObjectDiff

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

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

public class ObjectDiff extends NodeDiff
A dynamic GraphDiff that represents a delta between object simple properties at diff creation time and its current state.

See Also:
  - Serialized Form

- ## Field Summary

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

  `diffId, nodeId`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `apply(GraphChangeHandler handler)`
  Calls appropriate methods on the handler to "replay" this change.
  `ObjectId`
  `getArcSnapshotValue(String propertyName)`
  `ObjectId`
  `getCurrentArcSnapshotValue(String propertyName)`
  `Object`
  `getSnapshotValue(String propertyName)`
  `boolean`
  `isNoop()`
  Checks whether at least a single property is modified.
  `void`
  `undo(GraphChangeHandler handler)`
  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`

- ## Method Details

  - ### getSnapshotValue

    public Object getSnapshotValue(String propertyName)

  - ### getArcSnapshotValue

    public ObjectId getArcSnapshotValue(String propertyName)

  - ### getCurrentArcSnapshotValue

    public ObjectId getCurrentArcSnapshotValue(String propertyName)
    Since:
      4.2

  - ### isNoop

    public boolean isNoop()
    Checks whether at least a single property is modified.
    Specified by:
      `isNoop` in interface `GraphDiff`
    Overrides:
      `isNoop` in class `NodeDiff`

  - ### undo

    public void undo(GraphChangeHandler handler)
    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`

  - ### apply

    public void apply(GraphChangeHandler handler)
    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`