java.lang.Object
org.litebridgedb.convert.converter.AbstractNumberConverter<Long>
org.litebridgedb.convert.converter.LongConverter
- All Implemented Interfaces:
Converter<Long>,ConverterFunction<Long>,SqlConverter<Long>
A converter for
Long values.
Handles Types.BIGINT.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LongconvertNumber(Number value) Converts aNumberinstance to the target type.protected LongconvertString(String value) Parses a string value into the target type.@Nullable Class<?> Returns the primitive counterpart of the target class.int[]sqlTypes()Returns the SQL types associated with this converter.Class<?> type()Returns the target Java class this converter handles.Methods inherited from class org.litebridgedb.convert.converter.AbstractNumberConverter
convertMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.litebridgedb.convert.converter.ConverterFunction
convert
-
Constructor Details
-
LongConverter
public LongConverter()
-
-
Method Details
-
convertNumber
Description copied from class:AbstractNumberConverterConverts aNumberinstance to the target type.- Specified by:
convertNumberin classAbstractNumberConverter<Long>- Parameters:
value- the numeric value to convert- Returns:
- the converted value
-
convertString
Description copied from class:AbstractNumberConverterParses a string value into the target type.- Specified by:
convertStringin classAbstractNumberConverter<Long>- Parameters:
value- the string value to parse- Returns:
- the parsed value
-
type
Returns the target Java class this converter handles. -
primitiveType
Returns the primitive counterpart of the target class.- Specified by:
primitiveTypein interfaceConverter<Long>- Returns:
long.class
-
sqlTypes
public int[] sqlTypes()Returns the SQL types associated with this converter.- Specified by:
sqlTypesin interfaceSqlConverter<Long>- Returns:
- an array containing
Types.BIGINT
-