Examples of TwoWayFieldBridge


Examples of org.hibernate.search.bridge.TwoWayFieldBridge

    if ( builderIndexedEntity == null ) {
      throw new SearchException( "No Lucene configuration set up for: " + clazz );
    }


    final TwoWayFieldBridge fieldBridge = builderIndexedEntity.getIdBridge();
    final String fieldName = builderIndexedEntity.getIdKeywordName();
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge();
    contextualBridge
        .setClass( clazz )
        .setFieldName( fieldName )
View Full Code Here

Examples of org.hibernate.search.bridge.TwoWayFieldBridge

      // it might be possible to receive not-indexes subclasses of the currently indexed type;
      // 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 );
View Full Code Here

Examples of org.hibernate.search.bridge.TwoWayFieldBridge

      }
      //default: continue indexing this instance
    }

    DocumentBuilderIndexedEntity docBuilder = entityIndexBinding.getDocumentBuilder();
    TwoWayFieldBridge idBridge = docBuilder.getIdBridge();
    conversionContext.pushProperty( docBuilder.getIdKeywordName() );
    String idInString = null;
    try {
      idInString = conversionContext
          .setClass( clazz )
View Full Code Here

Examples of org.hibernate.search.bridge.TwoWayFieldBridge

      throw new SearchException( message, e );
    }
  }

  protected boolean isIdNumeric(Class<?> entityType) {
    TwoWayFieldBridge idBridge = workspace.getDocumentBuilder(entityType).getIdBridge();
    return idBridge instanceof NumericFieldBridge;
  }
View Full Code Here

Examples of org.hibernate.search.bridge.TwoWayFieldBridge

  @SuppressWarnings("unchecked")
  private void index( Object entity, Session session ) throws InterruptedException {
    Serializable id = session.getIdentifier( entity );
    Class clazz = Hibernate.getClass( entity );
    DocumentBuilderIndexedEntity docBuilder = documentBuilders.get( clazz );
    TwoWayFieldBridge idBridge = docBuilder.getIdBridge();
    String idInString = idBridge.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

Examples of org.hibernate.search.bridge.TwoWayFieldBridge

      // it might be possible to receive not-indexes subclasses of the currently indexed type;
      // 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 );
View Full Code Here

Examples of org.hibernate.search.bridge.TwoWayFieldBridge

  public static Serializable getDocumentId(SearchFactoryImplementor searchFactoryImplementor, Class<?> clazz, Document document) {
    final DocumentBuilderIndexedEntity<?> builderIndexedEntity = getDocumentBuilder(
        searchFactoryImplementor,
        clazz
    );
    final TwoWayFieldBridge fieldBridge = builderIndexedEntity.getIdBridge();
    final String fieldName = builderIndexedEntity.getIdKeywordName();
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge();
    contextualBridge
        .setClass( clazz )
        .setFieldName( fieldName )
View Full Code Here

Examples of org.hibernate.search.bridge.TwoWayFieldBridge

    }
    workspace.incrementModificationCounter( 1 );
  }

  protected static boolean isIdNumeric(DocumentBuilderIndexedEntity<?> documentBuilder) {
    TwoWayFieldBridge idBridge = documentBuilder.getIdBridge();
    return idBridge instanceof NumericFieldBridge;
  }
View Full Code Here

Examples of org.hibernate.search.bridge.TwoWayFieldBridge

  public static Serializable getDocumentId(SearchFactoryImplementor searchFactoryImplementor, Class<?> clazz, Document document, ConversionContext conversionContext) {
    final DocumentBuilderIndexedEntity builderIndexedEntity = getDocumentBuilder(
        searchFactoryImplementor,
        clazz
    );
    final TwoWayFieldBridge fieldBridge = builderIndexedEntity.getIdBridge();
    final String fieldName = builderIndexedEntity.getIdKeywordName();
    try {
      return (Serializable) conversionContext
          .setClass( clazz )
          .pushIdentifierProperty()
View Full Code Here

Examples of org.hibernate.search.bridge.TwoWayFieldBridge

    }
    workspace.notifyWorkApplied( work );
  }

  protected static boolean isIdNumeric(DocumentBuilderIndexedEntity documentBuilder) {
    TwoWayFieldBridge idBridge = documentBuilder.getIdBridge();
    return idBridge instanceof NumericFieldBridge;
  }
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.