|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - Name of KeyGeneratorTypeHandler interface.public interface KeyGeneratorTypeHandler<T>
Interface for various type handlers. The type handler handles integer, BigDecimal, Long and String values depending on the database engine.
| Method Summary | |
|---|---|
T |
add(T value,
int offset)
Adds the new Type Handler of type T to the provided handler instance at the provided offset. |
void |
bindValue(PreparedStatement stmt,
int index,
T value)
Binds the value in the sql preparedstatement at the provided index location. |
T |
getNextValue(ResultSet rs)
Gets the value from resultset by calling getValue method and then calls the increment method to increment the extracted value. |
T |
getValue(ResultSet rs)
Reads the resultset and return the extracted typehandler value from the resultset. |
T |
increment(T value)
Increments the provided value by ONE. |
| Method Detail |
|---|
T getNextValue(ResultSet rs)
throws PersistenceException,
SQLException
rs - A ResultSet object.
PersistenceException - If ResultSet is empty or if the type handler
should fail when current row of the record set is not valid,
SQLException - If database error occurs.
T getValue(ResultSet rs)
throws PersistenceException,
SQLException
rs - ResultSet object
PersistenceException - If ResultSet is empty or if the type handler
should fail when current row of the record set is not valid,
SQLException - If database error occurs.T increment(T value)
value - value to be incremented.
T add(T value,
int offset)
value - Handler instance in which new value will be addedoffset - Offset location. *
void bindValue(PreparedStatement stmt,
int index,
T value)
throws SQLException
stmt - A SQL PreparedStatement.index - Index location for binding parameter to statement.value - Value to be binded
SQLException - If SQL error occurs in binding param to sql statement.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||