Top Description Fields Constructors Methods
org.hibernate.jpa.event.internal

pack-priv final Class CallbackRegistryImpl

extends Object
implements CallbackRegistryImplementor
Class Inheritance
All Implemented Interfaces
org.hibernate.jpa.event.internal.CallbackRegistryImplementor, org.hibernate.jpa.event.spi.CallbackBuilder.CallbackRegistrar, org.hibernate.jpa.event.spi.CallbackRegistrar, org.hibernate.jpa.event.spi.CallbackRegistry, java.io.Serializable
Annotations
@SuppressWarnings:unchecked, serial
Imports
java.util.HashMap, javax.persistence.PersistenceException, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.jpa.event.spi.Callback, .CallbackType

Deprecated

as a consequence of CallbackRegistryImplementor being deprecated. See corresponding docs for further information.

Keep track of all lifecycle callbacks and listeners for a given persistence unit
Authors
Kabir Khan, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private HashMap<Class<T>, Callback[]>
private HashMap<Class<T>, Callback[]>
private HashMap<Class<T>, Callback[]>
private HashMap<Class<T>, Callback[]>
private HashMap<Class<T>, Callback[]>
private HashMap<Class<T>, Callback[]>
private HashMap<Class<T>, Callback[]>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private boolean
callback(Callback[] callbacks, Object bean)

private HashMap<Class<T>, Callback[]>
public boolean
public boolean
public boolean
public boolean
hasRegisteredCallbacks(Class<T>
The entity Class to check against
entityClass
,
CallbackType
The type of callback to look for
callbackType
)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.hasRegisteredCallbacks.

Do we have any registered callbacks of the given type for the given entity?
public boolean
private boolean
notEmpty(Callback[] callbacks)

public void
public boolean
public void
public void
public void
public void
public boolean
public void
registerCallbacks(Class<T>
The entity Class to register the Callbacks against
entityClass
,
Callback[]
The Callbacks to register against the given entity Class
callbacks
)

Implements org.hibernate.jpa.event.spi.CallbackRegistrar.registerCallbacks.

Register the callback against the given entity.
public void
private CallbackType
toCallbackType(Class<T> annotationClass)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

postCreatesback to summary
private HashMap<Class<T>, Callback[]> postCreates
postLoadsback to summary
private HashMap<Class<T>, Callback[]> postLoads
postRemovesback to summary
private HashMap<Class<T>, Callback[]> postRemoves
postUpdatesback to summary
private HashMap<Class<T>, Callback[]> postUpdates
preCreatesback to summary
private HashMap<Class<T>, Callback[]> preCreates
preRemovesback to summary
private HashMap<Class<T>, Callback[]> preRemoves
preUpdatesback to summary
private HashMap<Class<T>, Callback[]> preUpdates

Constructor Detail

CallbackRegistryImplback to summary
pack-priv CallbackRegistryImpl()

Method Detail

callbackback to summary
private boolean callback(Callback[] callbacks, Object bean)
determineAppropriateCallbackMapback to summary
private HashMap<Class<T>, Callback[]> determineAppropriateCallbackMap(CallbackType callbackType)
hasPostCreateCallbacksback to summary
public boolean hasPostCreateCallbacks(Class<T> entityClass)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.hasPostCreateCallbacks.

Annotations
@Override
hasPostRemoveCallbacksback to summary
public boolean hasPostRemoveCallbacks(Class<T> entityClass)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.hasPostRemoveCallbacks.

Annotations
@Override
hasPostUpdateCallbacksback to summary
public boolean hasPostUpdateCallbacks(Class<T> entityClass)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.hasPostUpdateCallbacks.

Annotations
@Override
hasRegisteredCallbacksback to summary
public boolean hasRegisteredCallbacks(Class<T> entityClass, CallbackType callbackType)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.hasRegisteredCallbacks.

Doc from org.hibernate.jpa.event.spi.CallbackRegistry.hasRegisteredCallbacks.

Do we have any registered callbacks of the given type for the given entity?

Parameters
entityClass:Class<T>

The entity Class to check against

callbackType:CallbackType

The type of callback to look for

Returns:boolean

true indicates there are already registered callbacks of that type for that class; false indicates there are not.

Annotations
@Override
hasRegisteredCallbacksback to summary
public boolean hasRegisteredCallbacks(Class<T> entityClass, Class<T> annotationClass)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.hasRegisteredCallbacks.

Annotations
@Override
notEmptyback to summary
private boolean notEmpty(Callback[] callbacks)
postCreateback to summary
public void postCreate(Object bean)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.postCreate.

Annotations
@Override
postLoadback to summary
public boolean postLoad(Object bean)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.postLoad.

Annotations
@Override
postRemoveback to summary
public void postRemove(Object bean)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.postRemove.

Annotations
@Override
postUpdateback to summary
public void postUpdate(Object bean)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.postUpdate.

Annotations
@Override
preCreateback to summary
public void preCreate(Object bean)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.preCreate.

Annotations
@Override
preRemoveback to summary
public void preRemove(Object bean)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.preRemove.

Annotations
@Override
preUpdateback to summary
public boolean preUpdate(Object bean)

Implements org.hibernate.jpa.event.spi.CallbackRegistry.preUpdate.

Annotations
@Override
registerCallbacksback to summary
public void registerCallbacks(Class<T> entityClass, Callback[] callbacks)

Implements org.hibernate.jpa.event.spi.CallbackRegistrar.registerCallbacks.

Doc from org.hibernate.jpa.event.spi.CallbackRegistrar.registerCallbacks.

Register the callback against the given entity.

Parameters
entityClass:Class<T>

The entity Class to register the Callbacks against

callbacks:Callback[]

The Callbacks to register against the given entity Class

Annotations
@Override
releaseback to summary
public void release()

Implements org.hibernate.jpa.event.internal.CallbackRegistryImplementor.release.

toCallbackTypeback to summary
private CallbackType toCallbackType(Class<T> annotationClass)