public abstract class AbstractTypeHandlerAdapter<T>
extends org.apache.ibatis.type.BaseTypeHandler<T>
| 构造器和说明 |
|---|
AbstractTypeHandlerAdapter() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Object |
buildFillValue(T parameter) |
protected abstract T |
convertValue(Object columnValue)
解析数据库字段值,转成java对象值
|
protected abstract Object |
getFillValue(T defaultValue)
保存到数据库的值
|
T |
getNullableResult(CallableStatement cs,
int columnIndex) |
T |
getNullableResult(ResultSet rs,
int columnIndex) |
T |
getNullableResult(ResultSet rs,
String columnName) |
void |
setNonNullParameter(PreparedStatement ps,
int i,
T parameter,
org.apache.ibatis.type.JdbcType jdbcType) |
protected void |
setNullParameter(PreparedStatement ps,
int i,
T parameter,
org.apache.ibatis.type.JdbcType jdbcType) |
void |
setParameter(PreparedStatement ps,
int i,
T parameter,
org.apache.ibatis.type.JdbcType jdbcType) |
protected void |
setParameterDefault(PreparedStatement ps,
int i,
T parameter,
org.apache.ibatis.type.JdbcType jdbcType)
setParameter默认行为
|
protected void |
setParameterValue(PreparedStatement ps,
int i,
T parameter,
org.apache.ibatis.type.JdbcType jdbcType) |
protected abstract T convertValue(Object columnValue)
columnValue - 数据库值protected abstract Object getFillValue(T defaultValue)
defaultValue - 默认值public T getNullableResult(ResultSet rs, String columnName) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.BaseTypeHandler<T>SQLExceptionpublic T getNullableResult(ResultSet rs, int columnIndex) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.BaseTypeHandler<T>SQLExceptionpublic T getNullableResult(CallableStatement cs, int columnIndex) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.BaseTypeHandler<T>SQLExceptionpublic void setParameter(PreparedStatement ps, int i, T parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException
setParameter 在接口中 org.apache.ibatis.type.TypeHandler<T>setParameter 在类中 org.apache.ibatis.type.BaseTypeHandler<T>SQLExceptionprotected void setNullParameter(PreparedStatement ps, int i, T parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException
SQLExceptionpublic void setNonNullParameter(PreparedStatement ps, int i, T parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException
setNonNullParameter 在类中 org.apache.ibatis.type.BaseTypeHandler<T>SQLExceptionprotected void setParameterValue(PreparedStatement ps, int i, T parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException
SQLExceptionprotected void setParameterDefault(PreparedStatement ps, int i, T parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException
ps - PreparedStatementi - 字段索引parameter - 参数jdbcType - 数据类型SQLException - 抛出SQLExceptionCopyright © 2021. All Rights Reserved.