Package net.sf.jkniv.whinstone.types
Interface Convertible<A,B>
-
- Type Parameters:
A- the type of the class attributeB- the type of the jdbc data column
- All Known Implementing Classes:
BooleanBitType,BooleanCharType,BooleanIntType,BooleanVarcharType,CalendarIntType,CalendarTimestampType,DateIntType,DateTimestampType,DateTimeType,DateType,DoubleBigDecimalType,EnumNameType,EnumOrdinalType,IntLongType,LongBigDecimalType,LongNumericType,NoConverterType,ShortIntType
public interface Convertible<A,B>Convert or make the parser from Jdbc type to java object (class attribute) or vice-versa.Note: the implementation must be thread-safe, null-safe and provides a constructor:
public MyConverter(String)- Since:
- 0.6.0
- Author:
- Alisson Gomes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ColumnTypegetColumnType()Class<A>getType()AtoAttribute(B jdbc)Convert the jdbc value to attribute format or typeBtoJdbc(A attribute)Convert attribute to jdbc format or type
-
-
-
Method Detail
-
toJdbc
B toJdbc(A attribute)
Convert attribute to jdbc format or type- Parameters:
attribute- the value of to be converted- Returns:
- the value to be stored for jdbc driver
-
toAttribute
A toAttribute(B jdbc)
Convert the jdbc value to attribute format or type- Parameters:
jdbc- the value stored at database- Returns:
- the value of attribute converted
-
getColumnType
ColumnType getColumnType()
-
-