Package org.hibernate.search.bridge.util.impl

Examples of org.hibernate.search.bridge.util.impl.ContextualExceptionBridgeHelper


  }

  @Override
  public Query createQuery() {
    final int size = fieldContexts.size();
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    if ( size == 1 ) {
      return queryCustomizer.setWrappedQuery( createQuery( fieldContexts.get( 0 ), conversionContext ) ).createQuery();
    }
    else {
      BooleanQuery aggregatedFieldsQuery = new BooleanQuery( );
View Full Code Here


          range.isMinIncluded(),
          range.isMaxIncluded()
      );
    }
    else if ( minOrMax instanceof Date ) {
      final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      return createRangeQuery(
          documentBuilder.objectToString( getFieldName(), range.getMin(), conversionContext ),
          documentBuilder.objectToString( getFieldName(), range.getMax(), conversionContext ),
          range.isMinIncluded(),
          range.isMaxIncluded()
View Full Code Here

    session.clear();
  }

  private void indexAllQueue(Session session, List<?> entities, InstanceInitializer sessionInitializer) {
    try {
      ConversionContext contextualBridge = new ContextualExceptionBridgeHelper();
        if ( entities == null || entities.isEmpty() ) {
          return;
        }
        else {
          log.tracef( "received a list of objects to index: %s", entities );
View Full Code Here

  private void indexAllQueue(Session session) {
    final InstanceInitializer sessionInitializer = new HibernateSessionLoadingInitializer(
        (SessionImplementor) session );
    try {
      ConversionContext contextualBridge = new ContextualExceptionBridgeHelper();
      while ( true ) {
        List<?> takeList = source.take();
        if ( takeList == null ) {
          break;
        }
View Full Code Here

  private void index(Session session, Object entity) {
    try {
      final InstanceInitializer sessionInitializer = new HibernateSessionLoadingInitializer(
          (SessionImplementor) session );
      final ConversionContext contextualBridge = new ContextualExceptionBridgeHelper();

      // trick to attach the objects to session:
      session.buildLockRequest( LockOptions.NONE ).lock( entity );
      index( entity, session, sessionInitializer, contextualBridge );
      monitor.documentsBuilt( 1 );
View Full Code Here

    session.clear();
  }

  private void indexAllQueue(Session session, List<?> entities, InstanceInitializer sessionInitializer) {
    try {
      ConversionContext contextualBridge = new ContextualExceptionBridgeHelper();
        if ( entities == null || entities.isEmpty() ) {
          return;
        }
        else {
          log.tracef( "received a list of objects to index: %s", entities );
View Full Code Here

    return fieldCacheUsage;
  }

  @Deprecated //with no replacement: too expensive to create the conversionContext each time this was needed
  public Term getTerm(Serializable id) {
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    return new Term( idKeywordName, objectToString( idBridge, idKeywordName, id, conversionContext ) );
  }
View Full Code Here

    return fieldCacheUsage;
  }

  @Deprecated //with no replacement: too expensive to create the conversionContext each time this was needed
  public Term getTerm(Serializable id) {
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    DocumentFieldMetadata fieldMetadata = idPropertyMetadata.getFieldMetadata( idFieldName );
    String idFieldName = fieldMetadata.getName();
    return new Term( idFieldName, objectToString( getIdBridge(), idFieldName, id, conversionContext ) );
  }
View Full Code Here

    this.fieldContexts = fieldContexts;
  }

  public Query createQuery() {
    final int size = fieldContexts.size();
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    if ( size == 1 ) {
      return queryCustomizer.setWrappedQuery( createQuery( fieldContexts.get( 0 ), conversionContext ) ).createQuery();
    }
    else {
      BooleanQuery aggregatedFieldsQuery = new BooleanQuery();
View Full Code Here

    return fieldCacheUsage;
  }

  @Deprecated //with no replacement: too expensive to create the conversionContext each time this was needed
  public Term getTerm(Serializable id) {
    final ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
    return new Term( idKeywordName, objectToString( idBridge, idKeywordName, id, conversionContext ) );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.bridge.util.impl.ContextualExceptionBridgeHelper

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.