T - the basic typepublic abstract class AbstractJdbcType<T> extends java.lang.Object implements JdbcType<T>
JdbcType interface .| Modifier and Type | Field and Description |
|---|---|
protected int |
type
the SQL type
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractJdbcType(int type)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
convertToLogFormat(T value)
Converts the value to the SQL log format.
|
protected abstract java.lang.String |
doConvertToLogFormat(T value) |
protected abstract T |
doGetValue(java.sql.CallableStatement callableStatement,
int index) |
protected abstract T |
doGetValue(java.sql.ResultSet resultSet,
int index) |
protected abstract void |
doSetValue(java.sql.PreparedStatement preparedStatement,
int index,
T value) |
T |
getValue(java.sql.CallableStatement callableStatement,
int index)
Retrieves the value from the
CallableStatement object. |
T |
getValue(java.sql.ResultSet resultSet,
int index)
Retrieves the column value from the
ResultSet object. |
void |
registerOutParameter(java.sql.CallableStatement callableStatement,
int index)
Registers the OUT parameter to the
CallableStatement object. |
void |
setValue(java.sql.PreparedStatement preparedStatement,
int index,
T value)
Sets the value to the
PreparedStatement object. |
protected AbstractJdbcType(int type)
type - the SQL typepublic T getValue(java.sql.ResultSet resultSet, int index) throws java.sql.SQLException
JdbcTypeResultSet object.public void setValue(java.sql.PreparedStatement preparedStatement,
int index,
T value)
throws java.sql.SQLException
JdbcTypePreparedStatement object.public void registerOutParameter(java.sql.CallableStatement callableStatement,
int index)
throws java.sql.SQLException
JdbcTypeCallableStatement object.registerOutParameter in interface JdbcType<T>callableStatement - the callable statementindex - the parameter indexjava.sql.SQLException - if callableStatement throws SQLExceptionpublic T getValue(java.sql.CallableStatement callableStatement, int index) throws java.sql.SQLException
JdbcTypeCallableStatement object.public java.lang.String convertToLogFormat(T value)
SqlLogFormatterconvertToLogFormat in interface SqlLogFormatter<T>value - the valueprotected abstract T doGetValue(java.sql.ResultSet resultSet, int index) throws java.sql.SQLException
java.sql.SQLExceptionprotected abstract void doSetValue(java.sql.PreparedStatement preparedStatement,
int index,
T value)
throws java.sql.SQLException
java.sql.SQLExceptionprotected abstract T doGetValue(java.sql.CallableStatement callableStatement, int index) throws java.sql.SQLException
java.sql.SQLExceptionprotected abstract java.lang.String doConvertToLogFormat(T value)