Package org.apache.openjpa.persistence
Interface HintValueConverter
-
- All Known Implementing Classes:
HintValueConverter.EnumToInteger
,HintValueConverter.OpenJPAEnumToInteger
,HintValueConverter.StringToBoolean
,HintValueConverter.StringToInteger
,MixedLockLevelsHelper
public interface HintValueConverter
Converts a given user-specified value to a target type consumable by the kernel. Used by hint processing.- Since:
- 2.0.0
- Author:
- Pinaki Poddar
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
HintValueConverter.EnumToInteger
Convert the enum value to an enumerated set of constants.static class
HintValueConverter.OpenJPAEnumToInteger
Converts an OpenJPA specific enum to an equivalent kernel constant.static class
HintValueConverter.StringToBoolean
static class
HintValueConverter.StringToInteger
Converts a String to an integer.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canConvert(java.lang.Class<?> type)
Affirm if this receiver can convert the value of the given type.java.lang.Object
convert(java.lang.Object original)
Convert the user-specified value to a kernel consumable value.
-
-
-
Method Detail
-
convert
java.lang.Object convert(java.lang.Object original)
Convert the user-specified value to a kernel consumable value.- Parameters:
original
- the user-specified value- Returns:
- an equivalent value consumable by a kernel construct.
- Throws:
java.lang.IllegalArgumentException
- if the given value can not be converted.
-
canConvert
boolean canConvert(java.lang.Class<?> type)
Affirm if this receiver can convert the value of the given type.
-
-