|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeMapper<T>
A TypeMapper
allows for interaction with the SQL -> Java
mapping process. Types in EoD SQL are mapped based on what the Java
type is, not what the SQL type is, this allows for greater flexability
since many Java types can all map to the same SQL type.
By default most datatypes you will need already have TypeMapper
s:
Method Summary | |
---|---|
T |
get(ResultSet results,
int column)
Attempts to convert the result of the specified column in the ResultSet into the type this TypeMapper
returns. |
void |
set(PreparedStatement statement,
int column,
T obj)
Attempts to convert the specified object into a SQL object and place it into the PreparedStatement . |
Method Detail |
---|
T get(ResultSet results, int column) throws SQLException
ResultSet
into the type this TypeMapper
returns.
results
- the ResultSet
to fetch data fromcolumn
- the column number in the ResultSet
SQLException
- if the SQL type cannot be mapped with
this TypeMapper
void set(PreparedStatement statement, int column, T obj) throws SQLException
PreparedStatement
.
statement
- the PreparedStatement
to place the data intocolumn
- the column in the statement where the data should be putobj
- the object to map
SQLException
- if the object cannot be mapped with this
TypeMapper
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |