Package org.hibernate.jpa.event.spi
Interface CallbackRegistry
public interface CallbackRegistry
Registry of JPA entity lifecycle callbacks by entity and type.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasRegisteredCallbacks
(Class<?> entityClass, CallbackType callbackType) Do we have any registered callbacks of the given type for the given entity?void
postCreate
(Object entity) boolean
void
postRemove
(Object entity) void
postUpdate
(Object entity) void
void
boolean
void
release()
Signals that the CallbackRegistry will no longer be used.
-
Method Details
-
hasRegisteredCallbacks
Do we have any registered callbacks of the given type for the given entity?- Parameters:
entityClass
- The entity Class to check againstcallbackType
- The type of callback to look for- Returns:
true
indicates there are already registered callbacks of that type for that class;false
indicates there are not.
-
preCreate
-
postCreate
-
preUpdate
-
postUpdate
-
preRemove
-
postRemove
-
postLoad
-
release
void release()Signals that the CallbackRegistry will no longer be used. In particular, it is important to release references to class types to avoid classloader leaks.
-