Package org.hibernate.jpa.event.spi
Interface CallbackRegistry
-
public interface CallbackRegistryRegistry of Callbacks by entity and type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasRegisteredCallbacks(Class<?> entityClass, CallbackType callbackType)Do we have any registered callbacks of the given type for the given entity?voidpostCreate(Object entity)booleanpostLoad(Object entity)voidpostRemove(Object entity)voidpostUpdate(Object entity)voidpreCreate(Object entity)voidpreRemove(Object entity)booleanpreUpdate(Object entity)voidrelease()Signals that the CallbackRegistry will no longer be used.
-
-
-
Method Detail
-
hasRegisteredCallbacks
boolean hasRegisteredCallbacks(Class<?> entityClass, CallbackType callbackType)
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
void preCreate(Object entity)
-
postCreate
void postCreate(Object entity)
-
preUpdate
boolean preUpdate(Object entity)
-
postUpdate
void postUpdate(Object entity)
-
preRemove
void preRemove(Object entity)
-
postRemove
void postRemove(Object entity)
-
postLoad
boolean postLoad(Object entity)
-
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.
-
-