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 and Description
    --- | ---
    `protected CallbackDescriptor[]` | `callbacks`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CallbackMap()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### callbacks

          protected CallbackDescriptor[] callbacks

  - ### Constructor Detail

    - #### CallbackMap

          public CallbackMap()

  - ### Method Detail

    - #### 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)

Copyright © 2001–2023 Apache Cayenne. All rights reserved.