Class SimpleStrategyRegistrationImpl<T>
- java.lang.Object
-
- org.hibernate.boot.registry.selector.SimpleStrategyRegistrationImpl<T>
-
- Type Parameters:
T- The strategy type.
- All Implemented Interfaces:
StrategyRegistration<T>
public class SimpleStrategyRegistrationImpl<T> extends Object implements StrategyRegistration<T>
A simple implementation of StrategyRegistration.
-
-
Constructor Summary
Constructors Constructor Description SimpleStrategyRegistrationImpl(Class<T> strategyRole, Class<? extends T> strategyImplementation, Iterable<String> selectorNames)Constructs a SimpleStrategyRegistrationImpl.SimpleStrategyRegistrationImpl(Class<T> strategyRole, Class<? extends T> strategyImplementation, String... selectorNames)Constructs a SimpleStrategyRegistrationImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<String>getSelectorNames()Any registered names for this strategy registration.Class<? extends T>getStrategyImplementation()The strategy implementation class.Class<T>getStrategyRole()The strategy role.
-
-
-
Constructor Detail
-
SimpleStrategyRegistrationImpl
public SimpleStrategyRegistrationImpl(Class<T> strategyRole, Class<? extends T> strategyImplementation, Iterable<String> selectorNames)
Constructs a SimpleStrategyRegistrationImpl.- Parameters:
strategyRole- The strategy contractstrategyImplementation- The strategy implementation classselectorNames- The selection/registration names for this implementation
-
SimpleStrategyRegistrationImpl
public SimpleStrategyRegistrationImpl(Class<T> strategyRole, Class<? extends T> strategyImplementation, String... selectorNames)
Constructs a SimpleStrategyRegistrationImpl.- Parameters:
strategyRole- The strategy contractstrategyImplementation- The strategy implementation classselectorNames- The selection/registration names for this implementation
-
-
Method Detail
-
getStrategyRole
public Class<T> getStrategyRole()
Description copied from interface:StrategyRegistrationThe strategy role. Best practice says this should be an interface.- Specified by:
getStrategyRolein interfaceStrategyRegistration<T>- Returns:
- The strategy contract/role.
-
getSelectorNames
public Iterable<String> getSelectorNames()
Description copied from interface:StrategyRegistrationAny registered names for this strategy registration.- Specified by:
getSelectorNamesin interfaceStrategyRegistration<T>- Returns:
- The registered selection names.
-
getStrategyImplementation
public Class<? extends T> getStrategyImplementation()
Description copied from interface:StrategyRegistrationThe strategy implementation class.- Specified by:
getStrategyImplementationin interfaceStrategyRegistration<T>- Returns:
- The strategy implementation.
-
-