public class RowExtractor2SingleColumn<T> extends Object implements RowExtractor<T>
| 构造器和说明 |
|---|
RowExtractor2SingleColumn(Class<T> requiredType) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Object |
convertValueToRequiredType(Object value,
Class<?> requiredType) |
protected Object |
getColumnValue(ResultSet rs,
int index) |
protected Object |
getColumnValue(ResultSet rs,
int index,
Class<?> requiredType) |
T |
mapRow(ResultSet rs,
int rowNum)
实现必须实现此方法来映射ResultSet中的每一行数据。
|
public T mapRow(ResultSet rs, int rowNum) throws SQLException
RowExtractormapRow 在接口中 RowExtractor<T>rs - 要映射的结果集(为当前行预初始化)rowNum - 当前行数null)SQLException - 如果遇到获取列值的SQLException(即,不需要捕获SQLException)protected Object getColumnValue(ResultSet rs, int index, Class<?> requiredType) throws SQLException
SQLExceptionprotected Object getColumnValue(ResultSet rs, int index) throws SQLException
SQLExceptionCopyright © 2023. All rights reserved.