Package org.apache.cayenne.map

# Class CallbackMap

java.lang.Object
org.apache.cayenne.map.CallbackMap

All Implemented Interfaces:
  `Serializable`

public class CallbackMap extends Object implements Serializable
A generic descriptor of a set of standard lifecycle callbacks.

Since:
  3.0
See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected CallbackDescriptor[]`
  `callbacks`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CallbackMap()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `encodeCallbacksAsXML(XMLEncoder encoder)`
  `CallbackDescriptor`
  `getCallbackDescriptor(LifecycleEvent callbackType)`
  `CallbackDescriptor[]`
  `getCallbacks()`
  Returns all event callbacks as an array ordered by event type.
  `CallbackDescriptor`
  `getPostAdd()`
  `CallbackDescriptor`
  `getPostLoad()`
  `CallbackDescriptor`
  `getPostPersist()`
  `CallbackDescriptor`
  `getPostRemove()`
  `CallbackDescriptor`
  `getPostUpdate()`
  `CallbackDescriptor`
  `getPrePersist()`
  `CallbackDescriptor`
  `getPreRemove()`
  `CallbackDescriptor`
  `getPreUpdate()`

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

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

- ## Field Details

  - ### callbacks

    protected CallbackDescriptor[] callbacks

- ## Constructor Details

  - ### CallbackMap

    public CallbackMap()

- ## Method Details

  - ### getCallbacks

    public CallbackDescriptor[] getCallbacks()
    Returns all event callbacks as an array ordered by event type.

  - ### getCallbackDescriptor

    public CallbackDescriptor getCallbackDescriptor(LifecycleEvent callbackType)
    Parameters:
      `callbackType` - callback type id
    Returns:
      CallbackDescriptor for the specified callback type id

  - ### getPostLoad

    public CallbackDescriptor getPostLoad()

  - ### getPostPersist

    public CallbackDescriptor getPostPersist()

  - ### getPostRemove

    public CallbackDescriptor getPostRemove()

  - ### getPostUpdate

    public CallbackDescriptor getPostUpdate()

  - ### getPostAdd

    public CallbackDescriptor getPostAdd()

  - ### getPrePersist

    public CallbackDescriptor getPrePersist()

  - ### getPreRemove

    public CallbackDescriptor getPreRemove()

  - ### getPreUpdate

    public CallbackDescriptor getPreUpdate()

  - ### encodeCallbacksAsXML

    public void encodeCallbacksAsXML(XMLEncoder encoder)