Class StrategySelectorBuilder
- java.lang.Object
-
- org.hibernate.boot.registry.selector.internal.StrategySelectorBuilder
-
public class StrategySelectorBuilder extends Object
Builder forStrategySelector
instances.
-
-
Constructor Summary
Constructors Constructor Description StrategySelectorBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
addExplicitStrategyRegistration(Class<T> strategy, Class<? extends T> implementation, String name)
Adds an explicit (as opposed to discovered) strategy registration.<T> void
addExplicitStrategyRegistration(StrategyRegistration<T> strategyRegistration)
Adds an explicit (as opposed to discovered) strategy registration.StrategySelector
buildSelector(ClassLoaderService classLoaderService)
Builds the selector.
-
-
-
Method Detail
-
addExplicitStrategyRegistration
public <T> void addExplicitStrategyRegistration(Class<T> strategy, Class<? extends T> implementation, String name)
Adds an explicit (as opposed to discovered) strategy registration.- Type Parameters:
T
- The type of the strategy. Used to make sure that the strategy and implementation are type compatible.- Parameters:
strategy
- The strategyimplementation
- The strategy implementationname
- The registered name
-
addExplicitStrategyRegistration
public <T> void addExplicitStrategyRegistration(StrategyRegistration<T> strategyRegistration)
Adds an explicit (as opposed to discovered) strategy registration.- Type Parameters:
T
- The type of the strategy. Used to make sure that the strategy and implementation are type compatible.- Parameters:
strategyRegistration
- The strategy implementation registration.
-
buildSelector
public StrategySelector buildSelector(ClassLoaderService classLoaderService)
Builds the selector.- Parameters:
classLoaderService
- The class loading service used to (attempt to) resolve any un-registered strategy implementations.- Returns:
- The selector.
-
-