injector.setMetadataProvider( new MappingModelMetadataProvider( original, mapping ) );
}
}
private FilterCachingStrategy buildFilterCachingStrategy(SearchConfiguration searchConfiguration) {
FilterCachingStrategy filterCachingStrategy;
String filterCachingStrategyName = searchConfiguration.getProperties()
.getProperty( Environment.FILTER_CACHING_STRATEGY );
if ( StringHelper.isEmpty( filterCachingStrategyName ) || "mru".equalsIgnoreCase( filterCachingStrategyName ) ) {
filterCachingStrategy = new MRUFilterCachingStrategy();
}
else {
Class<?> filterCachingStrategyClass = searchConfiguration.getClassLoaderService()
.classForName( filterCachingStrategyName );
filterCachingStrategy = ClassLoaderHelper.instanceFromClass(
FilterCachingStrategy.class,
filterCachingStrategyClass,
"filterCachingStrategy"
);
}
filterCachingStrategy.initialize( searchConfiguration.getProperties() );
return filterCachingStrategy;
}