Examples of appendListeners()


Examples of org.hibernate.event.service.internal.EventListenerRegistryImpl.appendListeners()

    eventListenerRegistry.addDuplicationStrategy(
        new HibernateSearchIntegrator.DuplicationStrategyImpl(
            FullTextIndexEventListener.class
        )
    );
    eventListenerRegistry.appendListeners( EventType.POST_INSERT, new FullTextIndexEventListener() );

    assertTrue(
        "We should only be one listener, but we have " + eventEventListenerGroup.count(),
        eventEventListenerGroup.count() == 1
    );
View Full Code Here

Examples of org.hibernate.event.service.spi.EventListenerRegistry.appendListeners()

    final EventListenerRegistry listenerRegistry = activationContext.getServiceRegistry()
        .getService( EventListenerRegistry.class );

    listenerRegistry.addDuplicationStrategy( DuplicationStrategyImpl.INSTANCE );

    listenerRegistry.appendListeners( EventType.PRE_INSERT, listener );
    listenerRegistry.appendListeners( EventType.PRE_UPDATE, listener );
    listenerRegistry.appendListeners( EventType.PRE_DELETE, listener );

    listener.initialize( activationContext.getConfiguration() );
  }
View Full Code Here

Examples of org.hibernate.event.service.spi.EventListenerRegistry.appendListeners()

        .getService( EventListenerRegistry.class );

    listenerRegistry.addDuplicationStrategy( DuplicationStrategyImpl.INSTANCE );

    listenerRegistry.appendListeners( EventType.PRE_INSERT, listener );
    listenerRegistry.appendListeners( EventType.PRE_UPDATE, listener );
    listenerRegistry.appendListeners( EventType.PRE_DELETE, listener );

    listener.initialize( activationContext.getConfiguration() );
  }
View Full Code Here

Examples of org.hibernate.event.service.spi.EventListenerRegistry.appendListeners()

    listenerRegistry.addDuplicationStrategy( DuplicationStrategyImpl.INSTANCE );

    listenerRegistry.appendListeners( EventType.PRE_INSERT, listener );
    listenerRegistry.appendListeners( EventType.PRE_UPDATE, listener );
    listenerRegistry.appendListeners( EventType.PRE_DELETE, listener );

    listener.initialize( activationContext.getConfiguration() );
  }

  @SuppressWarnings({"unchecked", "UnusedParameters"})
View Full Code Here

Examples of org.hibernate.event.service.spi.EventListenerRegistry.appendListeners()

    if ( !sessionFactory.getSettings().isSecondLevelCacheEnabled() ) {
      // Nothing to do, if caching is disabled
      return;
    }
    EventListenerRegistry eventListenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );
    eventListenerRegistry.appendListeners( EventType.POST_INSERT, this );
    eventListenerRegistry.appendListeners( EventType.POST_DELETE, this );
    eventListenerRegistry.appendListeners( EventType.POST_UPDATE, this );
  }

  private void evictCache(Object entity, EntityPersister persister, EventSource session, Object[] oldState) {
View Full Code Here

Examples of org.hibernate.event.service.spi.EventListenerRegistry.appendListeners()

      // Nothing to do, if caching is disabled
      return;
    }
    EventListenerRegistry eventListenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );
    eventListenerRegistry.appendListeners( EventType.POST_INSERT, this );
    eventListenerRegistry.appendListeners( EventType.POST_DELETE, this );
    eventListenerRegistry.appendListeners( EventType.POST_UPDATE, this );
  }

  private void evictCache(Object entity, EntityPersister persister, EventSource session, Object[] oldState) {
    try {
View Full Code Here

Examples of org.hibernate.event.service.spi.EventListenerRegistry.appendListeners()

      return;
    }
    EventListenerRegistry eventListenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );
    eventListenerRegistry.appendListeners( EventType.POST_INSERT, this );
    eventListenerRegistry.appendListeners( EventType.POST_DELETE, this );
    eventListenerRegistry.appendListeners( EventType.POST_UPDATE, this );
  }

  private void evictCache(Object entity, EntityPersister persister, EventSource session, Object[] oldState) {
    try {
      SessionFactoryImplementor factory = persister.getFactory();
View Full Code Here

Examples of org.hibernate.event.service.spi.EventListenerRegistry.appendListeners()

  private void registerHibernateSearchEventListener(FullTextIndexEventListener eventListener, SessionFactoryServiceRegistry serviceRegistry) {
    EventListenerRegistry listenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );
    listenerRegistry.addDuplicationStrategy( new DuplicationStrategyImpl( FullTextIndexEventListener.class ) );

    listenerRegistry.appendListeners( EventType.POST_INSERT, eventListener );
    listenerRegistry.appendListeners( EventType.POST_UPDATE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_DELETE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_COLLECTION_RECREATE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_COLLECTION_REMOVE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_COLLECTION_UPDATE, eventListener );
View Full Code Here

Examples of org.hibernate.event.service.spi.EventListenerRegistry.appendListeners()

  private void registerHibernateSearchEventListener(FullTextIndexEventListener eventListener, SessionFactoryServiceRegistry serviceRegistry) {
    EventListenerRegistry listenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );
    listenerRegistry.addDuplicationStrategy( new DuplicationStrategyImpl( FullTextIndexEventListener.class ) );

    listenerRegistry.appendListeners( EventType.POST_INSERT, eventListener );
    listenerRegistry.appendListeners( EventType.POST_UPDATE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_DELETE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_COLLECTION_RECREATE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_COLLECTION_REMOVE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_COLLECTION_UPDATE, eventListener );
    listenerRegistry.appendListeners( EventType.FLUSH, eventListener );
View Full Code Here

Examples of org.hibernate.event.service.spi.EventListenerRegistry.appendListeners()

    EventListenerRegistry listenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );
    listenerRegistry.addDuplicationStrategy( new DuplicationStrategyImpl( FullTextIndexEventListener.class ) );

    listenerRegistry.appendListeners( EventType.POST_INSERT, eventListener );
    listenerRegistry.appendListeners( EventType.POST_UPDATE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_DELETE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_COLLECTION_RECREATE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_COLLECTION_REMOVE, eventListener );
    listenerRegistry.appendListeners( EventType.POST_COLLECTION_UPDATE, eventListener );
    listenerRegistry.appendListeners( EventType.FLUSH, eventListener );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.