|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectnet.hasor.db.jdbc.core.mapper.AbstractRowMapper<T>
net.hasor.db.jdbc.core.mapper.BeanPropertyRowMapper<T>
public class BeanPropertyRowMapper<T>
用于 POJO 的 RowMapper
| 构造方法摘要 | |
|---|---|
BeanPropertyRowMapper()
Create a new BeanPropertyRowMapper. |
|
BeanPropertyRowMapper(Class<T> requiredType)
Create a new BeanPropertyRowMapper. |
|
| 方法摘要 | ||
|---|---|---|
protected Object |
getColumnValue(ResultSet rs,
int index,
Class<?> requiredType)
取得指定列的值 |
|
boolean |
isCaseInsensitive()
|
|
T |
mapRow(ResultSet rs,
int rowNum)
实现这个方法为结果集的一行记录进行转换,并将最终转换结果返回。 |
|
static
|
newInstance(Class<T> mappedClass)
Static factory method to create a new BeanPropertyRowMapper (with the mapped class specified only once). |
|
void |
setCaseInsensitive(boolean caseInsensitive)
|
|
void |
setRequiredType(Class<T> requiredType)
Set the type that each result object is expected to match. |
|
| 从类 net.hasor.db.jdbc.core.mapper.AbstractRowMapper 继承的方法 |
|---|
convertValueToRequiredType, getResultSetValue |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public BeanPropertyRowMapper()
public BeanPropertyRowMapper(Class<T> requiredType)
| 方法详细信息 |
|---|
public void setRequiredType(Class<T> requiredType)
If not specified, the column value will be exposed as returned by the JDBC driver.
public boolean isCaseInsensitive()
public void setCaseInsensitive(boolean caseInsensitive)
public T mapRow(ResultSet rs,
int rowNum)
throws SQLException
RowMapper 复制的描述
rs - 记录集rowNum - 当前记录的行号
SQLException
protected Object getColumnValue(ResultSet rs,
int index,
Class<?> requiredType)
throws SQLException
SQLExceptionpublic static <T> BeanPropertyRowMapper<T> newInstance(Class<T> mappedClass)
mappedClass - the class that each row should be mapped to
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||