| 构造器和说明 |
|---|
MappingRowMapper(Class<T> mapperClass)
Create a new ResultMapper.
|
MappingRowMapper(Class<T> mapperClass,
TypeHandlerRegistry handlerRegistry)
Create a new ResultMapper.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Collection<FieldInfo> |
allFieldInfoByProperty() |
FieldInfo |
findFieldInfoByProperty(String propertyName) |
String |
getCategory()
分类(对于mysql 是 db,对于 pg 是 schema,对于 oracle 是 owner)
|
Class<T> |
getMapperClass() |
TableInfo |
getTableInfo() |
String |
getTableName()
表名
|
boolean |
isCaseInsensitive() |
T |
mapRow(ResultSet rs,
int rowNum)
实现这个方法为结果集的一行记录进行转换,并将最终转换结果返回。
|
static <T> MappingRowMapper<T> |
newInstance(Class<T> mappedClass)
Static factory method to create a new BeanPropertyRowMapper (with the mapped class specified only once).
|
static <T> MappingRowMapper<T> |
newInstance(Class<T> mappedClass,
TypeHandlerRegistry registry)
Static factory method to create a new BeanPropertyRowMapper (with the mapped class specified only once).
|
void |
setCaseInsensitive(boolean caseInsensitive) |
public MappingRowMapper(Class<T> mapperClass, TypeHandlerRegistry handlerRegistry)
public String getCategory()
TableInfogetCategory 在接口中 TableInfopublic String getTableName()
TableInfogetTableName 在接口中 TableInfopublic boolean isCaseInsensitive()
public void setCaseInsensitive(boolean caseInsensitive)
public Collection<FieldInfo> allFieldInfoByProperty()
public TableInfo getTableInfo()
public T mapRow(ResultSet rs, int rowNum) throws SQLException
RowMappermapRow 在接口中 RowMapper<T>rs - 记录集rowNum - 当前记录的行号SQLExceptionpublic static <T> MappingRowMapper<T> newInstance(Class<T> mappedClass)
mappedClass - the class that each row should be mapped topublic static <T> MappingRowMapper<T> newInstance(Class<T> mappedClass, TypeHandlerRegistry registry)
mappedClass - the class that each row should be mapped toCopyright © 2020–2021. All rights reserved.