Package org.hibernate.search.event.impl

Examples of org.hibernate.search.event.impl.FullTextIndexEventListener


    final EventListenerRegistry service = sfi
        .getServiceRegistry()
        .getService( EventListenerRegistry.class );
    final Iterable<PostInsertEventListener> listeners = service.getEventListenerGroup( EventType.POST_INSERT )
        .listeners();
    FullTextIndexEventListener listener = null;
    //FIXME this sucks since we mandate the event listener use
    for ( PostInsertEventListener candidate : listeners ) {
      if ( candidate instanceof FullTextIndexEventListener ) {
        listener = (FullTextIndexEventListener) candidate;
        break;
      }
    }
    if ( listener == null ) {
      throw new HibernateException(
          "Hibernate Search Event listeners not configured, please check the reference documentation and the " +
              "application's hibernate.cfg.xml"
      );
    }
    return listener.getSearchFactoryImplementor();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.event.impl.FullTextIndexEventListener

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.