public class RemoteDataTypeHandler
extends org.apache.ibatis.type.BaseTypeHandler<com.github.sparkzxl.entity.data.RemoteData>
借鉴Hibernate的外键字段的思想,自定义一个类型处理器, 将数据库中 bigint、int、varchar类型的字段映射成JavaBean中 RemoteData 类型的字段
| 构造器和说明 |
|---|
RemoteDataTypeHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
com.github.sparkzxl.entity.data.RemoteData |
getNullableResult(CallableStatement cs,
int columnIndex) |
com.github.sparkzxl.entity.data.RemoteData |
getNullableResult(ResultSet rs,
int columnIndex) |
com.github.sparkzxl.entity.data.RemoteData |
getNullableResult(ResultSet rs,
String columnName) |
void |
setNonNullParameter(PreparedStatement ps,
int i,
com.github.sparkzxl.entity.data.RemoteData parameter,
org.apache.ibatis.type.JdbcType jdbcType)
insert 、update 时执行该方法
|
public void setNonNullParameter(PreparedStatement ps, int i, com.github.sparkzxl.entity.data.RemoteData parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException
setNonNullParameter 在类中 org.apache.ibatis.type.BaseTypeHandler<com.github.sparkzxl.entity.data.RemoteData>SQLExceptionpublic com.github.sparkzxl.entity.data.RemoteData getNullableResult(ResultSet rs, String columnName) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.BaseTypeHandler<com.github.sparkzxl.entity.data.RemoteData>SQLExceptionpublic com.github.sparkzxl.entity.data.RemoteData getNullableResult(ResultSet rs, int columnIndex) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.BaseTypeHandler<com.github.sparkzxl.entity.data.RemoteData>SQLExceptionpublic com.github.sparkzxl.entity.data.RemoteData getNullableResult(CallableStatement cs, int columnIndex) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.BaseTypeHandler<com.github.sparkzxl.entity.data.RemoteData>SQLExceptionCopyright © 2022. All rights reserved.