T - The transitional type.A - The application type.public interface TypeConverter<T,A>
Converts back and forth between transitional values and application values.
The intermediate value is the intermediate Java value read from the database (or written to it) using JDBC.
The application value is the value the application uses after all transformation from the database.
For example, a database column DECIMAL(4) can be used to represent a java.lang.Boolean type (that a database does not support natively) using the numeric values zero (0) and one (1). This database column value can be first read through JDBC as a java.lang.Short. Then, it can be converted into a java.lang.Boolean. In this case:
| Modifier and Type | Method and Description |
|---|---|
A |
decode(T intermediateValue) |
T |
encode(A applicationValue) |