public class SqlTimeTranslator extends java.lang.Object implements TypeTranslator<java.sql.Time>
PreparedStatement.setTime(int, java.sql.Time)
and ResultSet.getTime(int)
. This translator is available by default for
all tables when Database
is created.Constructor and Description |
---|
SqlTimeTranslator() |
Modifier and Type | Method and Description |
---|---|
java.sql.Time |
read(java.sql.ResultSet resultSet,
int columnIndex)
Reads value from result set.
|
void |
write(java.sql.PreparedStatement preparedStatement,
int parameterIndex,
java.sql.Time parameter)
Sets parameter value in the prepared statement.
|
public void write(java.sql.PreparedStatement preparedStatement, int parameterIndex, java.sql.Time parameter) throws java.lang.Exception
write
in interface TypeTranslator<java.sql.Time>
preparedStatement
- set column value as parameter in this statementparameterIndex
- set parameter at this indexparameter
- value to set in prepared statementjava.lang.Exception
- if errorpublic java.sql.Time read(java.sql.ResultSet resultSet, int columnIndex) throws java.lang.Exception
read
in interface TypeTranslator<java.sql.Time>
resultSet
- read value from this result setcolumnIndex
- read value at this column index from result setjava.lang.Exception
- if error