Package org.sql2o.converters
Class NumberConverter<V extends Number>
java.lang.Object
org.sql2o.converters.NumberConverter<V>
- All Implemented Interfaces:
Converter<V>
- Direct Known Subclasses:
BigDecimalConverter
,ByteConverter
,DoubleConverter
,FloatConverter
,IntegerConverter
,LongConverter
,ShortConverter
Base class for numeric converters.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConversion from SQL to Java.protected abstract V
convertNumberValue
(Number val) protected abstract V
convertStringValue
(String val) protected abstract String
toDatabaseParam
(V val) Conversion from Java to SQL.
-
Constructor Details
-
NumberConverter
public NumberConverter(boolean primitive)
-
-
Method Details
-
convert
Description copied from interface:Converter
Conversion from SQL to Java. -
convertNumberValue
-
convertStringValue
-
getTypeDescription
-
toDatabaseParam
Description copied from interface:Converter
Conversion from Java to SQL.- Specified by:
toDatabaseParam
in interfaceConverter<T>
-