Package org.apache.cayenne.graph

# Class ChildDiffLoader

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

All Implemented Interfaces:
  `GraphChangeHandler`

public class ChildDiffLoader extends Object implements GraphChangeHandler
A GraphChangeHandler that loads child ObjectContext diffs into a parent ObjectContext. Graph node ids are expected to be ObjectIds. This class is made public since 3.0 to be used in ObjectContext synchronizing

Since:
  1.2

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ObjectContext`
  `context`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ChildDiffLoader(ObjectContext context)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `arcCreated(Object nodeId, Object targetNodeId, ArcId arcId)`
  Notifies implementing object that a new arc was created between two nodes.
  `void`
  `arcDeleted(Object nodeId, Object targetNodeId, ArcId arcId)`
  Notifies implementing object that an arc between two nodes was deleted.
  `protected Persistent`
  `findObject(Object nodeId)`
  `protected Persistent`
  `findObjectInCollection(Object nodeId, Object toManyHolder)`
  `static boolean`
  `isProcessingChildDiff()`
  Returns whether child diff processing is in progress.
  `void`
  `nodeCreated(Object nodeId)`
  Notifies implementing object that a new node was created in the graph.
  `void`
  `nodeIdChanged(Object nodeId, Object newId)`
  Notifies implementing object that a node was assigned a new id.
  `void`
  `nodePropertyChanged(Object nodeId, String property, Object oldValue, Object newValue)`
  Notifies implementing object that a node's property was modified.
  `void`
  `nodeRemoved(Object nodeId)`
  Notifies implementing object that a node was removed from the graph.
  `static void`
  `setExternalChange(Boolean flag)`
  Sets whether child diff processing is in progress.

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

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

- ## Field Details

  - ### context

    protected ObjectContext context

- ## Constructor Details

  - ### ChildDiffLoader

    public ChildDiffLoader(ObjectContext context)

- ## Method Details

  - ### isProcessingChildDiff

    public static boolean isProcessingChildDiff()
    Returns whether child diff processing is in progress.
    Since:
      3.0

  - ### setExternalChange

    public static void setExternalChange(Boolean flag)
    Sets whether child diff processing is in progress.
    Since:
      3.0

  - ### nodeIdChanged

    public void nodeIdChanged(Object nodeId, Object newId)
    Description copied from interface: `GraphChangeHandler`
    Notifies implementing object that a node was assigned a new id.
    Specified by:
      `nodeIdChanged` in interface `GraphChangeHandler`

  - ### nodeCreated

    public void nodeCreated(Object nodeId)
    Description copied from interface: `GraphChangeHandler`
    Notifies implementing object that a new node was created in the graph.
    Specified by:
      `nodeCreated` in interface `GraphChangeHandler`

  - ### nodeRemoved

    public void nodeRemoved(Object nodeId)
    Description copied from interface: `GraphChangeHandler`
    Notifies implementing object that a node was removed from the graph.
    Specified by:
      `nodeRemoved` in interface `GraphChangeHandler`

  - ### nodePropertyChanged

    public void nodePropertyChanged(Object nodeId, String property, Object oldValue, Object newValue)
    Description copied from interface: `GraphChangeHandler`
    Notifies implementing object that a node's property was modified.
    Specified by:
      `nodePropertyChanged` in interface `GraphChangeHandler`

  - ### arcCreated

    public void arcCreated(Object nodeId, Object targetNodeId, ArcId arcId)
    Description copied from interface: `GraphChangeHandler`
    Notifies implementing object that a new arc was created between two nodes.
    Specified by:
      `arcCreated` in interface `GraphChangeHandler`

  - ### arcDeleted

    public void arcDeleted(Object nodeId, Object targetNodeId, ArcId arcId)
    Description copied from interface: `GraphChangeHandler`
    Notifies implementing object that an arc between two nodes was deleted.
    Specified by:
      `arcDeleted` in interface `GraphChangeHandler`

  - ### findObject

    protected Persistent findObject(Object nodeId)

  - ### findObjectInCollection

    protected Persistent findObjectInCollection(Object nodeId, Object toManyHolder)