Class BytesColumnMapper
java.lang.Object
org.huiche.jdbc.mapper.column.basic.BytesColumnMapper
- All Implemented Interfaces:
ColumnMapper<byte[]>
Byte[] 列转换器
- Author:
- Maning
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]read(ResultSet rs, int columnIndex, Type type, Configuration configuration) 从ResultSet读取值,请确保安全或已使用ColumnMapper.canRead(Type, Configuration)测试booleanwrite(PreparedStatement ps, int parameterIndex, byte[] value, Configuration configuration) 写入值到PreparedStatementMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ColumnMapper
canRead
-
Constructor Details
-
BytesColumnMapper
public BytesColumnMapper()默认构造
-
-
Method Details
-
read
public byte[] read(ResultSet rs, int columnIndex, Type type, Configuration configuration) throws SQLException Description copied from interface:ColumnMapper从ResultSet读取值,请确保安全或已使用ColumnMapper.canRead(Type, Configuration)测试- Specified by:
readin interfaceColumnMapper<byte[]>- Parameters:
rs- 结果集columnIndex- rs使用的columnIndex, 从1开始type- 类型configuration- 配置- Returns:
- 值 允许返回null
- Throws:
SQLException- 原生SQL异常
-
write
public boolean write(PreparedStatement ps, int parameterIndex, byte[] value, Configuration configuration) throws SQLException Description copied from interface:ColumnMapper写入值到PreparedStatement- Specified by:
writein interfaceColumnMapper<byte[]>- Parameters:
ps- PreparedStatementparameterIndex- ps使用的parameterIndex,从1开始value- 值,不会为nullconfiguration- 配置- Returns:
- 是否已写入
- Throws:
SQLException- 原生SQL异常
-