Class EmbeddableCallback

java.lang.Object
org.hibernate.jpa.event.internal.EmbeddableCallback
All Implemented Interfaces:
Serializable, Callback

@Deprecated(since="7") public class EmbeddableCallback extends Object
Deprecated.
The JPA specification does not require that we allow entity lifecycle callbacks on embeddable classes, and this is a misfeature since:
  • an embeddable objects doesn't have a well-defined lifecycle,
  • it's difficult to understand what this means for composite collection elements, and
  • currently, the PreUpdate/PostUpdate callbacks get called when the embeddable object is not itself being updated.
It would be OK to simply remove this capability, since fortunately we never documented it.
Represents a JPA callback method declared by an embeddable type.
See Also:
  • Method Details

    • performCallback

      public void performCallback(Object entity)
      Deprecated.
      Description copied from interface: Callback
      Contract for performing the callback
      Parameters:
      entity - Reference to the entity for which the callback is triggered.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • getCallbackType

      public CallbackType getCallbackType()
      Description copied from interface: Callback
      The type of callback (pre-update, pre-persist, etc) handled
      Specified by:
      getCallbackType in interface Callback