java.lang.Object
org.litebridgedb.convert.converter.GenericConverter<T>
org.litebridgedb.convert.converter.GenericSqlConverter<T>
- Type Parameters:
T- the target type
- All Implemented Interfaces:
Converter<T>,ConverterFunction<T>,SqlConverter<T>
A generic implementation of
SqlConverter that uses a ConverterFunction for the conversion logic.-
Constructor Summary
ConstructorsConstructorDescriptionGenericSqlConverter(Class<T> type, int[] sqlTypes, ConverterFunction<T> conversionFunction) Constructs a newGenericSqlConverterfor the specified type, SQL types, and conversion function.GenericSqlConverter(Class<T> type, int sqlType, ConverterFunction<T> conversionFunction) Constructs a newGenericSqlConverterfor the specified type, single SQL type, and conversion function. -
Method Summary
Methods inherited from class org.litebridgedb.convert.converter.GenericConverter
convert, typeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.litebridgedb.convert.converter.Converter
primitiveType, typeMethods inherited from interface org.litebridgedb.convert.converter.ConverterFunction
convert
-
Constructor Details
-
GenericSqlConverter
Constructs a newGenericSqlConverterfor the specified type, SQL types, and conversion function.- Parameters:
type- the target Java classsqlTypes- an array ofTypescodes associated with this converterconversionFunction- the conversion logic
-
GenericSqlConverter
Constructs a newGenericSqlConverterfor the specified type, single SQL type, and conversion function.- Parameters:
type- the target Java classsqlType- theTypescode associated with this converterconversionFunction- the conversion logic
-
-
Method Details
-
sqlTypes
public int[] sqlTypes()Returns an array ofTypesinteger codes that this converter is associated with.- Specified by:
sqlTypesin interfaceSqlConverter<T>- Returns:
- an array of SQL type codes
-