Package org.hibernate.jpa.event.spi
Interface CallbackRegistry
-
public interface CallbackRegistry
Registry of Callbacks by entity and type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasRegisteredCallbacks(Class<?> entityClass, CallbackType callbackType)
Do we have any registered callbacks of the given type for the given entity?void
postCreate(Object entity)
boolean
postLoad(Object entity)
void
postRemove(Object entity)
void
postUpdate(Object entity)
void
preCreate(Object entity)
void
preRemove(Object entity)
boolean
preUpdate(Object entity)
void
release()
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:
true
indicates there are already registered callbacks of that type for that class;false
indicates 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.
-
-