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 java.lang.Object implements StrategyRegistration<T>
A simple implementation of StrategyRegistration.
-
-
Constructor Summary
Constructors Constructor Description SimpleStrategyRegistrationImpl(java.lang.Class<T> strategyRole, java.lang.Class<? extends T> strategyImplementation, java.lang.Iterable<java.lang.String> selectorNames)
Constructs a SimpleStrategyRegistrationImpl.SimpleStrategyRegistrationImpl(java.lang.Class<T> strategyRole, java.lang.Class<? extends T> strategyImplementation, java.lang.String... selectorNames)
Constructs a SimpleStrategyRegistrationImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<java.lang.String>
getSelectorNames()
Any registered names for this strategy registration.java.lang.Class<? extends T>
getStrategyImplementation()
The strategy implementation class.java.lang.Class<T>
getStrategyRole()
The strategy role.
-
-
-
Constructor Detail
-
SimpleStrategyRegistrationImpl
public SimpleStrategyRegistrationImpl(java.lang.Class<T> strategyRole, java.lang.Class<? extends T> strategyImplementation, java.lang.Iterable<java.lang.String> selectorNames)
Constructs a SimpleStrategyRegistrationImpl.- Parameters:
strategyRole
- The strategy contractstrategyImplementation
- The strategy implementation classselectorNames
- The selection/registration names for this implementation
-
SimpleStrategyRegistrationImpl
public SimpleStrategyRegistrationImpl(java.lang.Class<T> strategyRole, java.lang.Class<? extends T> strategyImplementation, java.lang.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 java.lang.Class<T> getStrategyRole()
Description copied from interface:StrategyRegistration
The strategy role. Best practice says this should be an interface.- Specified by:
getStrategyRole
in interfaceStrategyRegistration<T>
- Returns:
- The strategy contract/role.
-
getSelectorNames
public java.lang.Iterable<java.lang.String> getSelectorNames()
Description copied from interface:StrategyRegistration
Any registered names for this strategy registration.- Specified by:
getSelectorNames
in interfaceStrategyRegistration<T>
- Returns:
- The registered selection names.
-
getStrategyImplementation
public java.lang.Class<? extends T> getStrategyImplementation()
Description copied from interface:StrategyRegistration
The strategy implementation class.- Specified by:
getStrategyImplementation
in interfaceStrategyRegistration<T>
- Returns:
- The strategy implementation.
-
-