public abstract class AbstractTypeHandler<T> extends net.hasor.utils.reflect.TypeReference<T> implements TypeHandler<T>
TypeHandler for references a generic type.
Important: Since 3.5.0, This class never call the ResultSet.wasNull() and
CallableStatement.wasNull() method for handling the SQL NULL value.
In other words, null value handling should be performed on subclass.
| 构造器和说明 |
|---|
AbstractTypeHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract T |
getNullableResult(CallableStatement cs,
int columnIndex) |
abstract T |
getNullableResult(ResultSet rs,
int columnIndex) |
abstract T |
getNullableResult(ResultSet rs,
String columnName) |
T |
getResult(CallableStatement cs,
int columnIndex) |
T |
getResult(ResultSet rs,
int columnIndex) |
T |
getResult(ResultSet rs,
String columnName) |
abstract void |
setNonNullParameter(PreparedStatement ps,
int i,
T parameter,
JDBCType jdbcType) |
void |
setParameter(PreparedStatement ps,
int i,
T parameter,
JDBCType jdbcType) |
getRawType, toStringpublic void setParameter(PreparedStatement ps, int i, T parameter, JDBCType jdbcType) throws SQLException
setParameter 在接口中 TypeHandler<T>SQLExceptionpublic T getResult(ResultSet rs, String columnName) throws SQLException
getResult 在接口中 TypeHandler<T>columnName - Colunm name, when configuration useColumnLabel is falseSQLExceptionpublic T getResult(ResultSet rs, int columnIndex) throws SQLException
getResult 在接口中 TypeHandler<T>SQLExceptionpublic T getResult(CallableStatement cs, int columnIndex) throws SQLException
getResult 在接口中 TypeHandler<T>SQLExceptionpublic abstract void setNonNullParameter(PreparedStatement ps, int i, T parameter, JDBCType jdbcType) throws SQLException
SQLExceptionpublic abstract T getNullableResult(ResultSet rs, String columnName) throws SQLException
columnName - Colunm name, when configuration useColumnLabel is falseSQLExceptionpublic abstract T getNullableResult(ResultSet rs, int columnIndex) throws SQLException
SQLExceptionpublic abstract T getNullableResult(CallableStatement cs, int columnIndex) throws SQLException
SQLExceptionCopyright © 2020–2021. All rights reserved.