IndexedTypeDescriptor typeDescriptor;
if ( indexedTypeDescriptors.containsKey( entityType ) ) {
typeDescriptor = indexedTypeDescriptors.get( entityType );
}
else {
EntityIndexBinding indexBinder = indexBindingForEntities.get( entityType );
IndexedTypeDescriptor indexedTypeDescriptor;
if ( indexBinder == null ) {
indexedTypeDescriptor = new IndexedTypeDescriptorForUnindexedType( entityType );
}
else {
indexedTypeDescriptor = new IndexedTypeDescriptorImpl(
indexBinder.getDocumentBuilder().getMetadata(),
indexBinder.getIndexManagers()
);
}
indexedTypeDescriptors.put( entityType, indexedTypeDescriptor );
typeDescriptor = indexedTypeDescriptor;
}