Package org.hibernate.search.engine.spi

Examples of org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity


  }

  @SuppressWarnings({ "unchecked", "rawtypes" })
  private AddLuceneWork createAddLuceneWork(Object entity, InstanceInitializer sessionInitializer,
      ConversionContext conversionContext, Serializable id, Class<?> clazz, EntityIndexBinder entityIndexBinding) {
    DocumentBuilderIndexedEntity docBuilder = entityIndexBinding.getDocumentBuilder();
    String idInString = idInString( conversionContext, id, clazz, docBuilder );
    // 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.
    return docBuilder.createAddWork( clazz, entity, id, idInString, sessionInitializer, conversionContext );
  }
View Full Code Here


  }

  @SuppressWarnings({ "unchecked", "rawtypes" })
  private AddLuceneWork createAddLuceneWork(Object entity, InstanceInitializer sessionInitializer,
      ConversionContext conversionContext, Serializable id, Class<?> clazz, EntityIndexBinder entityIndexBinding) {
    DocumentBuilderIndexedEntity docBuilder = entityIndexBinding.getDocumentBuilder();
    String idInString = idInString( conversionContext, id, clazz, docBuilder );
    // 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.
    return docBuilder.createAddWork( clazz, entity, id, idInString, sessionInitializer, conversionContext );
  }
View Full Code Here

          return;
      }
      //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 )
          .twoWayConversionContext( idBridge )
          .objectToString( id );
    }
    finally {
      conversionContext.popProperty();
    }
    //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,
        sessionInitializer,
View Full Code Here

      // 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;
    }
    DocumentBuilderIndexedEntity docBuilder = entityIndexBinding.getDocumentBuilder();
    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, sessionInitializer );
    backend.enqueueAsyncWork( addWork );
  }
View Full Code Here

          return;
      }
      //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 )
          .twoWayConversionContext( idBridge )
          .objectToString( id );
    }
    finally {
      conversionContext.popProperty();
    }
    //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,
        sessionInitializer,
View Full Code Here

      }
      // Create all DocumentBuilderIndexedEntity
      //FIXME DocumentBuilderIndexedEntity needs to be built by a helper method receiving Class<T> to infer T properly
      //XClass unfortunately is not (yet) genericized: TODO?
      final DocumentBuilderIndexedEntity<?> documentBuilder =
          new DocumentBuilderIndexedEntity(
              mappedXClass,
              context,
              mappedEntity.getSimilarity(),
              cfg.getReflectionManager(),
              optimizationBlackListedTypes,
View Full Code Here

      }
      // Create all DocumentBuilderIndexedEntity
      //FIXME DocumentBuilderIndexedEntity needs to be built by a helper method receiving Class<T> to infer T properly
      //XClass unfortunately is not (yet) genericized: TODO?
      final DocumentBuilderIndexedEntity<?> documentBuilder =
          new DocumentBuilderIndexedEntity(
              mappedXClass,
              context,
              mappedEntity.getSimilarity(),
              cfg.getReflectionManager(),
              optimizationBlackListedTypes,
View Full Code Here

   
      // Create all DocumentBuilderIndexedEntity
      //FIXME DocumentBuilderIndexedEntity needs to be built by a helper method receiving Class<T> to infer T properly
      //XClass unfortunately is not (yet) genericized: TODO?
      final DocumentBuilderIndexedEntity<?> documentBuilder =
          new DocumentBuilderIndexedEntity(
              mappedXClass,
              context,
              mappedEntity.getSimilarity(),
              reflectionManager,
              optimizationBlackListedTypes,
View Full Code Here

          return;
      }
      //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 )
          .twoWayConversionContext( idBridge )
          .objectToString( id );
    }
    finally {
      conversionContext.popProperty();
    }
    //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,
        sessionInitializer,
View Full Code Here

      // Create all DocumentBuilderIndexedEntity
      // FIXME DocumentBuilderIndexedEntity needs to be built by a helper method receiving Class<T> to infer T properly
      // XClass unfortunately is not (yet) genericized: TODO ?
      TypeMetadata typeMetadata = metadataProvider.getTypeMetadataFor( mappedClass );
      final DocumentBuilderIndexedEntity<?> documentBuilder =
          new DocumentBuilderIndexedEntity(
              mappedXClass,
              typeMetadata,
              context,
              cfg.getReflectionManager(),
              optimizationBlackListedTypes,
View Full Code Here

TOP

Related Classes of org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity

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.