*/
private FieldCacheCollectorFactory getAppropriateIdFieldCollectorFactory() {
Map<Class<?>, DocumentBuilderIndexedEntity<?>> builders = searchFactoryImplementor.getDocumentBuildersIndexedEntities();
Set<FieldCacheCollectorFactory> allCollectors = new HashSet<FieldCacheCollectorFactory>();
// we need all documentBuilder to agree on type, fieldName, and enabling the option:
FieldCacheCollectorFactory anyImplementation = null;
for ( Class<?> clazz : classesAndSubclasses ) {
DocumentBuilderIndexedEntity<?> docBuilder = builders.get( clazz );
FieldCacheCollectorFactory fieldCacheCollectionFactory = docBuilder.getIdFieldCacheCollectionFactory();
if ( fieldCacheCollectionFactory == null ) {
// some implementation disable it, so we won't use it
return null;
}
anyImplementation = fieldCacheCollectionFactory;