org.hibernate.search.query.fieldcache.impl
Class ClassLoadingStrategySelector

java.lang.Object
  extended by org.hibernate.search.query.fieldcache.impl.ClassLoadingStrategySelector

public class ClassLoadingStrategySelector
extends Object

A FieldCacheCollectorFactory requires two parameters which are inferred from the type of field and it's applied bridges. Not all cases can be covered. This class contains helpers to extract the proper parameters to create such a factory.

Author:
Sanne Grinovero (C) 2011 Red Hat Inc.

Constructor Summary
ClassLoadingStrategySelector()
           
 
Method Summary
static TwoWayStringBridge getTwoWayStringBridge(TwoWayFieldBridge fieldBridge)
          Extracts (if possible) the two way string bridge from a given two way field bridge
static FieldCacheLoadingType guessAppropriateCollectorType(TwoWayFieldBridge fieldBridge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoadingStrategySelector

public ClassLoadingStrategySelector()
Method Detail

guessAppropriateCollectorType

public static FieldCacheLoadingType guessAppropriateCollectorType(TwoWayFieldBridge fieldBridge)

getTwoWayStringBridge

public static TwoWayStringBridge getTwoWayStringBridge(TwoWayFieldBridge fieldBridge)
Extracts (if possible) the two way string bridge from a given two way field bridge

Parameters:
fieldBridge - the field bridge from which to extract (unwrap) the two way string bridge
Returns:
the underlying string bridge or null if we can't extract it


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved