Package org.hibernate.jpa.event.spi.jpa

Examples of org.hibernate.jpa.event.spi.jpa.CallbackRegistry


  @TemporaryWorkaround("Only needed until HHH-9451 is fixed upstream")
  private void attachPersistListener(SessionFactoryServiceRegistry serviceRegistry) {
    EventListenerRegistry eventListenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );

    JpaIntegrator integrator = getIntegrator( JpaIntegrator.class, serviceRegistry );
    CallbackRegistry callbackRegistry = integrator != null ? extractCallbackRegistry( integrator ) : null;

    eventListenerRegistry.addDuplicationStrategy( new OgmPersistEventDuplicationStrategy( callbackRegistry ) );

    eventListenerRegistry.getEventListenerGroup( EventType.MERGE ).appendListener( new OgmDefaultMergeEventListener() );
    eventListenerRegistry.getEventListenerGroup( EventType.PERSIST ).appendListener( new OgmDefaultPersistEventListener() );
View Full Code Here

TOP

Related Classes of org.hibernate.jpa.event.spi.jpa.CallbackRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.