Enum Class JpaEventListenerStyle

java.lang.Object
java.lang.Enum<JpaEventListenerStyle>
org.hibernate.boot.models.JpaEventListenerStyle
All Implemented Interfaces:
Serializable, Comparable<JpaEventListenerStyle>, Constable

public enum JpaEventListenerStyle extends Enum<JpaEventListenerStyle>
JPA defines 2 ways events callbacks can happen...
  • Enum Constant Details

    • CALLBACK

      public static final JpaEventListenerStyle CALLBACK
      The event method is declared on the entity class. The annotated method should define no arguments and have a void return type.
    • LISTENER

      public static final JpaEventListenerStyle LISTENER
      The event method is declared on a separate "listener" class named by EntityListeners. The annotated method should accept a single argument - the entity instance - and have a void return type.
  • Method Details

    • values

      public static JpaEventListenerStyle[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JpaEventListenerStyle valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null