Search in sources :

Example 1 with CallbackRegistry

use of org.hibernate.jpa.event.spi.CallbackRegistry in project hibernate-orm by hibernate.

the class EventListenerGroupAppendListenerTest method getCallbackRegistry.

private static CallbackRegistry getCallbackRegistry(MergeEventListener listener) throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException {
    Class<?> clazz = Class.forName("org.hibernate.event.internal.AbstractSaveEventListener");
    Field field = clazz.getDeclaredField("callbackRegistry");
    field.setAccessible(true);
    return (CallbackRegistry) field.get(listener);
}
Also used : Field(java.lang.reflect.Field) CallbackRegistry(org.hibernate.jpa.event.spi.CallbackRegistry)

Aggregations

Field (java.lang.reflect.Field)1 CallbackRegistry (org.hibernate.jpa.event.spi.CallbackRegistry)1