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 TypeMethodDescriptionbooleanhasRegisteredCallbacks(Class<?> entityClass, CallbackType callbackType) Do we have any registered callbacks of the given type for the given entity?voidpostCreate(Object entity) booleanvoidpostRemove(Object entity) voidpostUpdate(Object entity) voidvoidbooleanvoidrelease()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:
trueindicates there are already registered callbacks of that type for that class;falseindicates 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.
-