// 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 );