GraphEvent (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.graph, class: GraphEvent

# Class GraphEvent

java.lang.Object
java.util.EventObject
org.apache.cayenne.event.CayenneEvent
org.apache.cayenne.graph.GraphEvent

All Implemented Interfaces:
  `Serializable`

public class GraphEvent extends CayenneEvent
An event indicating a change in the object graph. A change is expressed as a GraphDiff, so the easiest way to process the event is the following:

       GraphChangeHandler handler = ..;
       event.getDiff().apply(handler);

Since:
  1.2
See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected GraphDiff`
  `diff`

  ### Fields inherited from class CayenneEvent

  `info, postedBy, subject`
  Modifier and Type
  Field
  Description
  `protected Map`
  `info`
  `protected Object`
  `postedBy`
  `protected EventSubject`
  `subject`

  ### Fields inherited from class EventObject

  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GraphEvent(Object source, Object postedBy, GraphDiff diff)`
  `GraphEvent(Object source, GraphDiff diff)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `GraphDiff`
  `getDiff()`

  ### Methods inherited from class CayenneEvent

  `getInfo, getPostedBy, getSubject, setPostedBy, setSubject`
  Modifier and Type
  Method
  Description
  `Map`
  `getInfo()`
  `Object`
  `getPostedBy()`
  Returns an object that posted this event.
  `EventSubject`
  `getSubject()`
  `void`
  `setPostedBy(Object postedBy)`
  `void`
  `setSubject(EventSubject subject)`

  ### Methods inherited from class EventObject

  `getSource, toString`

  ### Methods inherited from class Object

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

- ## Field Details

  - ### diff

    protected GraphDiff diff

- ## Constructor Details

  - ### GraphEvent

    public GraphEvent(Object source, GraphDiff diff)

  - ### GraphEvent

    public GraphEvent(Object source, Object postedBy, GraphDiff diff)

- ## Method Details

  - ### getDiff

    public GraphDiff getDiff()