Package org.hibernate.search.engine.impl

Examples of org.hibernate.search.engine.impl.MutableEntityIndexBinding


    // Create all IndexManagers, configure and start them:
    for ( XClass mappedXClass : rootIndexedEntities ) {

      Class<?> mappedClass = classMappings.get( mappedXClass );
      MutableEntityIndexBinding mappedEntity = indexesFactory.buildEntityIndexBinding( mappedXClass, mappedClass, cfg, buildContext );
      //interceptor might use non indexed state
      if ( mappedEntity.getEntityIndexingInterceptor() != null ) {
        optimizationBlackListedTypes.add( mappedXClass );
      }
      // 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,
              cfg.getInstanceInitializer()
          );
      mappedEntity.setDocumentBuilderIndexedEntity( documentBuilder );

      documentBuildersIndexedEntities.put( mappedClass, mappedEntity );
    }

    disableBlackListedTypesOptimization( classMappings, optimizationBlackListedTypes, documentBuildersIndexedEntities, documentBuildersContainedEntities );
View Full Code Here


      Similarity entitySimilarity = entityMapping.getSimilarity();
      if ( entitySimilarity == null ) {
        //might have been read from annotations, fill the missing information in the EntityIndexBinder:
        entitySimilarity = entityMapping.getDocumentBuilder().getSimilarity();
        if ( entitySimilarity != null ) {
          MutableEntityIndexBinding newMapping = buildTypeSafeMutableEntityBinder(
              clazz,
              entityMapping,
              entitySimilarity
          );
          entityMapping = newMapping;
View Full Code Here

   
    // Create all IndexManagers, configure and start them:
    for ( XClass mappedXClass : rootIndexedEntities ) {
     
      Class mappedClass = classMappings.get( mappedXClass );
      MutableEntityIndexBinding mappedEntity = indexesFactory.buildEntityIndexBinding( mappedXClass, mappedClass, cfg, buildContext );
      //interceptor might use non indexed state
        if ( mappedEntity.getEntityIndexingInterceptor() != null ) {
        optimizationBlackListedTypes.add( mappedXClass );
      }
      // 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,
              cfg.getInstanceInitializer()
          );
      mappedEntity.setDocumentBuilderIndexedEntity( documentBuilder );

      documentBuildersIndexedEntities.put( mappedClass, mappedEntity );
    }
   
    disableBlackListedTypesOptimization( classMappings, optimizationBlackListedTypes, documentBuildersIndexedEntities, documentBuildersContainedEntities );
View Full Code Here

      Similarity entitySimilarity = entityMapping.getSimilarity();
      if ( entitySimilarity == null ) {
        //might have been read from annotations, fill the missing information in the EntityIndexBinder:
        entitySimilarity = entityMapping.getDocumentBuilder().getSimilarity();
        if ( entitySimilarity != null ) {
          MutableEntityIndexBinding newMapping = new MutableEntityIndexBinding( entityMapping.getSelectionStrategy(), entitySimilarity, entityMapping.getIndexManagers() );
          newMapping.setDocumentBuilderIndexedEntity( entityMapping.getDocumentBuilder() );
          entityMapping = newMapping;
          documentBuildersIndexedEntities.put( clazz, entityMapping );
        }
      }
      IndexManager[] indexManagers = entityMapping.getIndexManagers();
View Full Code Here

   
    // Create all IndexManagers, configure and start them:
    for ( XClass mappedXClass : rootIndexedEntities ) {
     
      Class mappedClass = classMappings.get( mappedXClass );
      MutableEntityIndexBinding mappedEntity = indexesFactory.buildEntityIndexBinding( mappedXClass, mappedClass, cfg, buildContext, reflectionManager );
   
      // 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,
              cfg.getClassHelper()
          );
      mappedEntity.setDocumentBuilderIndexedEntity( documentBuilder );

      documentBuildersIndexedEntities.put( mappedClass, mappedEntity );
    }
   
    disableBlackListedTypesOptimization( classMappings, optimizationBlackListedTypes, documentBuildersIndexedEntities, documentBuildersContainedEntities );
View Full Code Here

      for ( IndexManager manager : providers ) {
        setSimilarity( similarityInstance, manager );
      }
    }
   
    return new MutableEntityIndexBinding( shardingStrategy, similarityInstance, providers );
  }
View Full Code Here

    IndexManagerHolder indexesFactory = factoryState.getAllIndexesManager();

    // Create all IndexManagers, configure and start them:
    for ( XClass mappedXClass : rootIndexedEntities ) {
      Class mappedClass = classMappings.get( mappedXClass );
      MutableEntityIndexBinding entityIndexBinding = indexesFactory.buildEntityIndexBinding( mappedXClass, mappedClass, cfg, buildContext );

      // interceptor might use non indexed state
      if ( entityIndexBinding.getEntityIndexingInterceptor() != null ) {
        optimizationBlackListedTypes.add( mappedXClass );
      }

      // 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,
              cfg.getInstanceInitializer()
          );
      entityIndexBinding.setDocumentBuilderIndexedEntity( documentBuilder );

      documentBuildersIndexedEntities.put( mappedClass, entityIndexBinding );
    }

    disableBlackListedTypesOptimization( classMappings, optimizationBlackListedTypes, documentBuildersIndexedEntities, documentBuildersContainedEntities );
View Full Code Here

    IndexManagerHolder indexesFactory = factoryState.getAllIndexesManager();

    // Create all IndexManagers, configure and start them:
    for ( XClass mappedXClass : rootIndexedEntities ) {
      Class mappedClass = classMappings.get( mappedXClass );
      MutableEntityIndexBinding entityIndexBinding = indexesFactory.buildEntityIndexBinding(
          mappedXClass,
          mappedClass,
          searchConfiguration,
          buildContext
      );

      // interceptor might use non indexed state
      if ( entityIndexBinding.getEntityIndexingInterceptor() != null ) {
        optimizationBlackListedTypes.add( mappedXClass );
      }

      // 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,
              configContext,
              searchConfiguration.getReflectionManager(),
              optimizationBlackListedTypes,
              searchConfiguration.getInstanceInitializer()
          );
      entityIndexBinding.setDocumentBuilderIndexedEntity( documentBuilder );

      documentBuildersIndexedEntities.put( mappedClass, entityIndexBinding );
    }

    disableBlackListedTypesOptimization(
View Full Code Here

      Similarity entitySimilarity = entityMapping.getSimilarity();
      if ( entitySimilarity == null ) {
        //might have been read from annotations, fill the missing information in the EntityIndexBinder:
        entitySimilarity = entityMapping.getDocumentBuilder().getSimilarity();
        if ( entitySimilarity != null ) {
          MutableEntityIndexBinding newMapping = new MutableEntityIndexBinding( entityMapping.getSelectionStrategy(), entitySimilarity, entityMapping.getIndexManagers() );
          newMapping.setDocumentBuilderIndexedEntity( entityMapping.getDocumentBuilder() );
          entityMapping = newMapping;
          documentBuildersIndexedEntities.put( clazz, entityMapping );
        }
      }
      IndexManager[] indexManagers = entityMapping.getIndexManagers();
View Full Code Here

   
    // Create all IndexManagers, configure and start them:
    for ( XClass mappedXClass : rootIndexedEntities ) {
     
      Class mappedClass = classMappings.get( mappedXClass );
      MutableEntityIndexBinding mappedEntity = indexesFactory.buildEntityIndexBinding( mappedXClass, mappedClass, cfg, buildContext );
   
      // 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,
              cfg.getInstanceInitializer()
          );
      mappedEntity.setDocumentBuilderIndexedEntity( documentBuilder );

      documentBuildersIndexedEntities.put( mappedClass, mappedEntity );
    }
   
    disableBlackListedTypesOptimization( classMappings, optimizationBlackListedTypes, documentBuildersIndexedEntities, documentBuildersContainedEntities );
View Full Code Here

TOP

Related Classes of org.hibernate.search.engine.impl.MutableEntityIndexBinding

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.