Package org.hibernate.search.engine.spi

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


          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

      // 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,
              cfg.getReflectionManager(),
              optimizationBlackListedTypes,
              cfg.getInstanceInitializer()
View Full Code Here

  private static void tryCreatingDocumentBuilder(XClass mappedXClass, ReflectionManager reflectionManager) {
    SearchConfiguration searchConfiguration = new SearchConfigurationForTest();
    ConfigContext context = new ConfigContext( searchConfiguration, new BuildContextForTest( searchConfiguration ) );
    MetadataProvider metadataProvider = new AnnotationMetadataProvider( reflectionManager, context );
    TypeMetadata typeMetadata = metadataProvider.getTypeMetadataFor( reflectionManager.toClass( mappedXClass ));
    new DocumentBuilderIndexedEntity( mappedXClass,
        typeMetadata,
        context,
        reflectionManager,
        Collections.<XClass>emptySet(),
        SimpleInitializer.INSTANCE );
View Full Code Here

  private String objectIdInString(Class<?> entityClass, Serializable id, ConversionContext conversionContext) {
    EntityIndexBinding indexBindingForEntity = searchFactory.getIndexBinding( entityClass );
    if ( indexBindingForEntity == null ) {
      throw new SearchException( "Unable to find entity type metadata while deserializing: " + entityClass );
    }
    DocumentBuilderIndexedEntity documentBuilder = indexBindingForEntity.getDocumentBuilder();
    return documentBuilder.objectToString( documentBuilder.getIdKeywordName(), id, conversionContext );
  }
View Full Code Here

      if (entityIndexBinding == null) {
         // it might be possible to receive not-indexes types
         return;
      }
      ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      DocumentBuilderIndexedEntity docBuilder = entityIndexBinding.getDocumentBuilder();
      final String idInString = keyTransformationHandler.keyToString(key);
      UpdateLuceneWork updateTask = docBuilder.createUpdateWork(
            clazz,
            value,
            idInString,
            idInString,
            SimpleInitializer.INSTANCE,
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,
              cfg.getReflectionManager(),
              optimizationBlackListedTypes,
              cfg.getInstanceInitializer()
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

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.