}
else if ( metadataProvider.containsSearchMetadata( mappedClass ) ) {
//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 DocumentBuilderContainedEntity<?> documentBuilder = new DocumentBuilderContainedEntity(
mappedXClass, typeMetadata, cfg.getReflectionManager(), optimizationBlackListedTypes, cfg.getInstanceInitializer()
);
//TODO enhance that, I don't like to expose EntityState
if ( documentBuilder.getEntityState() != EntityState.NON_INDEXABLE ) {
documentBuildersContainedEntities.put( mappedClass, documentBuilder );
}
}
bindFilterDefs( mappedXClass );
//TODO should analyzer def for classes at their same level???
}
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,