Package org.apache.openjpa.persistence
Class HintValueConverter.StringToInteger
- java.lang.Object
 - 
- org.apache.openjpa.persistence.HintValueConverter.StringToInteger
 
 
- 
- All Implemented Interfaces:
 HintValueConverter
- Enclosing interface:
 - HintValueConverter
 
public static class HintValueConverter.StringToInteger extends Object implements HintValueConverter
Converts a String to an integer.- Author:
 - Pinaki Poddar
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface org.apache.openjpa.persistence.HintValueConverter
HintValueConverter.EnumToInteger, HintValueConverter.OpenJPAEnumToInteger, HintValueConverter.StringToBoolean, HintValueConverter.StringToInteger 
 - 
 
- 
Constructor Summary
Constructors Constructor Description StringToInteger()Construct a converter that will simply translate a numeric string to a integer.StringToInteger(String[] strings, int[] numbers)Construct a converter that will translate any of the given strings to corresponding integer. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanConvert(Class<?> cls)Affirm if this receiver can convert the value of the given type.Objectconvert(Object s)Convert the user-specified value to a kernel consumable value. 
 - 
 
- 
- 
Constructor Detail
- 
StringToInteger
public StringToInteger()
Construct a converter that will simply translate a numeric string to a integer. 
- 
StringToInteger
public StringToInteger(String[] strings, int[] numbers)
Construct a converter that will translate any of the given strings to corresponding integer. Both arrays must not be null, must not contain null elements and must have the same dimension.- Parameters:
 strings-numbers-
 
 - 
 
- 
Method Detail
- 
convert
public Object convert(Object s)
Description copied from interface:HintValueConverterConvert the user-specified value to a kernel consumable value.- Specified by:
 convertin interfaceHintValueConverter- Parameters:
 s- the user-specified value- Returns:
 - an equivalent value consumable by a kernel construct.
 
 
- 
canConvert
public boolean canConvert(Class<?> cls)
Description copied from interface:HintValueConverterAffirm if this receiver can convert the value of the given type.- Specified by:
 canConvertin interfaceHintValueConverter
 
 - 
 
 -