Class LifecycleEventHandler
java.lang.Object
org.hibernate.boot.models.spi.LifecycleEventHandler
-
Constructor Summary
ConstructorsConstructorDescriptionLifecycleEventHandler(JpaEventListenerStyle consumerType, org.hibernate.models.spi.ClassDetails listenerClass, Map<CallbackType, org.hibernate.models.spi.MethodDetails> callbackMethods) -
Method Summary
Modifier and TypeMethodDescriptionstatic LifecycleEventHandlerfrom(JpaEventListenerStyle consumerType, org.hibernate.models.spi.ClassDetails listenerClassDetails, boolean errorIfEmpty) Create a handler from annotations based on annotated methods on the givenlistenerClassDetails.static LifecycleEventHandlerfrom(JpaEventListenerStyle consumerType, org.hibernate.models.spi.ClassDetails listenerClassDetails, org.hibernate.boot.jaxb.mapping.spi.JaxbEntityListenerImpl jaxbMapping, org.hibernate.models.spi.ModelsContext modelsContext) org.hibernate.models.spi.ClassDetailsorg.hibernate.models.spi.MethodDetailsgetCallbackMethod(CallbackType callbackType) org.hibernate.models.spi.MethodDetailsorg.hibernate.models.spi.MethodDetailsorg.hibernate.models.spi.MethodDetailsorg.hibernate.models.spi.MethodDetailsorg.hibernate.models.spi.MethodDetailsorg.hibernate.models.spi.MethodDetailsorg.hibernate.models.spi.MethodDetailsgetStyle()booleanstatic List<LifecycleEventHandler> listenersForTarget(org.hibernate.models.spi.ClassDetails listenerClassDetails, org.hibernate.models.spi.ClassDetails targetClassDetails, boolean errorIfEmpty) Create a listener handler from annotations, selecting only methods applicable to the callback target type.static booleanmatchesSignature(JpaEventListenerStyle callbackType, org.hibernate.models.spi.MethodDetails methodDetails)
-
Constructor Details
-
LifecycleEventHandler
public LifecycleEventHandler(JpaEventListenerStyle consumerType, org.hibernate.models.spi.ClassDetails listenerClass, Map<CallbackType, org.hibernate.models.spi.MethodDetails> callbackMethods)
-
-
Method Details
-
getStyle
-
getCallbackClass
public org.hibernate.models.spi.ClassDetails getCallbackClass() -
getCallbackMethod
-
getPrePersistMethod
public org.hibernate.models.spi.MethodDetails getPrePersistMethod() -
getPostPersistMethod
public org.hibernate.models.spi.MethodDetails getPostPersistMethod() -
getPreRemoveMethod
public org.hibernate.models.spi.MethodDetails getPreRemoveMethod() -
getPostRemoveMethod
public org.hibernate.models.spi.MethodDetails getPostRemoveMethod() -
getPreUpdateMethod
public org.hibernate.models.spi.MethodDetails getPreUpdateMethod() -
getPostUpdateMethod
public org.hibernate.models.spi.MethodDetails getPostUpdateMethod() -
getPostLoadMethod
public org.hibernate.models.spi.MethodDetails getPostLoadMethod() -
hasCallbackMethods
public boolean hasCallbackMethods() -
from
public static LifecycleEventHandler from(JpaEventListenerStyle consumerType, org.hibernate.models.spi.ClassDetails listenerClassDetails, org.hibernate.boot.jaxb.mapping.spi.JaxbEntityListenerImpl jaxbMapping, org.hibernate.models.spi.ModelsContext modelsContext) -
from
public static LifecycleEventHandler from(JpaEventListenerStyle consumerType, org.hibernate.models.spi.ClassDetails listenerClassDetails, boolean errorIfEmpty) Create a handler from annotations based on annotated methods on the givenlistenerClassDetails. -
listenersForTarget
public static List<LifecycleEventHandler> listenersForTarget(org.hibernate.models.spi.ClassDetails listenerClassDetails, org.hibernate.models.spi.ClassDetails targetClassDetails, boolean errorIfEmpty) Create a listener handler from annotations, selecting only methods applicable to the callback target type. -
matchesSignature
public static boolean matchesSignature(JpaEventListenerStyle callbackType, org.hibernate.models.spi.MethodDetails methodDetails)
-