| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
T - The database type - i.e. any type available from
            SQLDataTypeU - The user typepublic interface Converter<T,U>
A Converter for data types.
 
 A general data type conversion interface that can be provided to jOOQ at
 various places in order to perform custom data type conversion. Conversion is
 directed, this means that the Converter is used
 
fromType() is the type as defined in the database.toType() is the user-defined type
 Note: In order to avoid unwanted side-effects, it is highly recommended (yet
 not required) for from(Object) and to(Object) to be
 reciprocal. The two methods are reciprocal, if for all
 X and Y, it can be said that
 
Y.equals(converter.from(X)), then
 X.equals(converter.to(Y)).X.equals(converter.from(converter.to(X)))X.equals(converter.to(converter.from(X)))Furthermore, it is recommended (yet not required) that
converter.from(null) == nullconverter.to(null) == null
| Method Summary | |
|---|---|
 U | 
from(T databaseObject)
Convert a database object to a user object  | 
 Class<T> | 
fromType()
The database type  | 
 T | 
to(U userObject)
Convert a user object to a database object  | 
 Class<U> | 
toType()
The user type  | 
| Method Detail | 
|---|
U from(T databaseObject)
databaseObject - The database object
T to(U userObject)
userObject - The user object
Class<T> fromType()
Class<U> toType()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||