Package org.hibernate.search.bridge.util

Examples of org.hibernate.search.bridge.util.ContextualException2WayBridge$NamedVirtualXMember


    }


    final TwoWayFieldBridge fieldBridge = builderIndexedEntity.getIdBridge();
    final String fieldName = builderIndexedEntity.getIdKeywordName();
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge();
    contextualBridge
        .setClass( clazz )
        .setFieldName( fieldName )
        .setFieldBridge( fieldBridge )
        .pushMethod( "identifier" );
    return (Serializable) contextualBridge.get( fieldName, document );
  }
View Full Code Here


    if ( builderIndexedEntity == null ) {
      throw new SearchException( "No Lucene configuration set up for: " + clazz.getName() );
    }
    final int fieldNbr = fields.length;
    Object[] result = new Object[fieldNbr];
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge();
    contextualBridge.setClass( clazz );
    if ( builderIndexedEntity.getIdKeywordName() != null ) {
      final XMember member = builderIndexedEntity.getIdGetter();
      if ( member != null ) {
        contextualBridge.pushMethod( member.getName() );
      }
      populateResult(
          builderIndexedEntity.getIdKeywordName(),
          builderIndexedEntity.getIdBridge(),
          Store.YES,
          fields,
          result,
          document,
          contextualBridge
      );
      if ( member != null ) {
        contextualBridge.popMethod();
      }
    }

    final AbstractDocumentBuilder.PropertiesMetadata metadata = builderIndexedEntity.getMetadata();
    processFieldsForProjection( metadata, fields, result, document, contextualBridge );
View Full Code Here

      queue.add( createAddWork( entityClass, entity, id, idInString, batch ) );
    }
  }
 
  private String objectToString(TwoWayFieldBridge bridge, String fieldName, Object value) {
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass( getBeanClass() )
        .setFieldBridge( bridge )
        .setFieldName( fieldName );
    return contextualBridge.objectToString( value );
  }
View Full Code Here

        .setFieldName( fieldName );
    return contextualBridge.objectToString( value );
  }

  private String objectToString(StringBridge bridge, String fieldName, Object value) {
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass( getBeanClass() )
        .setStringBridge( bridge )
        .setFieldName( fieldName );
    return contextualBridge.objectToString( value );
  }
View Full Code Here

    }


    final TwoWayFieldBridge fieldBridge = builderIndexedEntity.getIdBridge();
    final String fieldName = builderIndexedEntity.getIdKeywordName();
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge();
    contextualBridge
        .setClass( clazz )
        .setFieldName( fieldName )
        .setFieldBridge( fieldBridge )
        .pushMethod( "identifier" );
    return (Serializable) contextualBridge.get( fieldName, document );
  }
View Full Code Here

    if ( builderIndexedEntity == null ) {
      throw new SearchException( "No Lucene configuration set up for: " + clazz );
    }
    final int fieldNbr = fields.length;
    Object[] result = new Object[fieldNbr];
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge();
    contextualBridge.setClass( clazz );
    if ( builderIndexedEntity.getIdKeywordName() != null ) {
      final XMember member = builderIndexedEntity.getIdGetter();
      if ( member != null ) {
        contextualBridge.pushMethod( member.getName() );
      }
      populateResult(
          builderIndexedEntity.getIdKeywordName(),
          builderIndexedEntity.getIdBridge(),
          Store.YES,
          fields,
          result,
          document,
          contextualBridge
      );
      if ( member != null ) {
        contextualBridge.popMethod();
      }
    }

    final AbstractDocumentBuilder.PropertiesMetadata metadata = builderIndexedEntity.getMetadata();
    processFieldsForProjection( metadata, fields, result, document, contextualBridge );
View Full Code Here

      queue.add( createAddWork( entityClass, entity, id, idInString, batch ) );
    }
  }
 
  private String objectToString(TwoWayFieldBridge bridge, String fieldName, Object value) {
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass( getBeanClass() )
        .setFieldBridge( bridge )
        .setFieldName( fieldName );
    return contextualBridge.objectToString( value );
  }
View Full Code Here

        .setFieldName( fieldName );
    return contextualBridge.objectToString( value );
  }

  private String objectToString(StringBridge bridge, String fieldName, Object value) {
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass( getBeanClass() )
        .setStringBridge( bridge )
        .setFieldName( fieldName );
    return contextualBridge.objectToString( value );
  }
View Full Code Here

      // being not-indexed, we skip them.
      // FIXME for improved performance: avoid loading them in an early phase.
      return;
    }
    TwoWayFieldBridge idBridge = docBuilder.getIdBridge();
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass(clazz)
        .setFieldName(docBuilder.getIdKeywordName())
        .setFieldBridge(idBridge);
    String idInString = contextualBridge.objectToString( id );
    //depending on the complexity of the object graph going to be indexed it's possible
    //that we hit the database several times during work construction.
    AddLuceneWork addWork = docBuilder.createAddWork( clazz, entity, id, idInString, true );
    backend.enqueueAsyncWork( addWork );
  }
View Full Code Here

      // being not-indexed, we skip them.
      // FIXME for improved performance: avoid loading them in an early phase.
      return;
    }
    TwoWayFieldBridge idBridge = docBuilder.getIdBridge();
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass(clazz)
        .setFieldName(docBuilder.getIdKeywordName())
        .setFieldBridge(idBridge);
    String idInString = contextualBridge.objectToString( id );
    //depending on the complexity of the object graph going to be indexed it's possible
    //that we hit the database several times during work construction.
    AddLuceneWork addWork = docBuilder.createAddWork( clazz, entity, id, idInString, true );
    backend.enqueueAsyncWork( addWork );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.bridge.util.ContextualException2WayBridge$NamedVirtualXMember

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.