Interface Callback<E>

All Superinterfaces:
Serializable

public interface Callback<E> extends Serializable
Represents a JPA entity lifecycle callback method.

There are two flavors of this, which we abstract here:

  • an annotated method of the entity class itself, or
  • an annotated method of a separate entity listener class identified via the EntityListeners annotation.
  • Method Summary

    Modifier and Type
    Method
    Description
    The type of callback (pre-update, pre-persist, etc) handled
    <S extends E>
    void
    performCallback(S entity)
    Contract for performing the callback
  • Method Details

    • getCallbackType

      CallbackType getCallbackType()
      The type of callback (pre-update, pre-persist, etc) handled
    • performCallback

      <S extends E> void performCallback(S entity)
      Contract for performing the callback
      Parameters:
      entity - Reference to the entity for which the callback is triggered.