Class InstantColumnMapper
java.lang.Object
org.huiche.jdbc.mapper.column.temporal.InstantColumnMapper
- All Implemented Interfaces:
ColumnMapper<Instant>
Instant 列转换器
- Author:
- Maning
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread(ResultSet rs, int columnIndex, Type type, Configuration configuration) 从ResultSet读取值,请确保安全或已使用ColumnMapper.canRead(Type, Configuration)测试booleanwrite(PreparedStatement ps, int parameterIndex, Instant 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
-
InstantColumnMapper
public InstantColumnMapper()默认构造
-
-
Method Details
-
read
public Instant 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<Instant>- Parameters:
rs- 结果集columnIndex- rs使用的columnIndex, 从1开始type- 类型configuration- 配置- Returns:
- 值 允许返回null
- Throws:
SQLException- 原生SQL异常
-
write
public boolean write(PreparedStatement ps, int parameterIndex, Instant value, Configuration configuration) throws SQLException Description copied from interface:ColumnMapper写入值到PreparedStatement- Specified by:
writein interfaceColumnMapper<Instant>- Parameters:
ps- PreparedStatementparameterIndex- ps使用的parameterIndex,从1开始value- 值,不会为nullconfiguration- 配置- Returns:
- 是否已写入
- Throws:
SQLException- 原生SQL异常
-