public abstract class ConfigJoinMapper extends Object implements ResultSetMapper
AttrNode
@{ResultProvider,
JsonMappingTest| 构造器和说明 |
|---|
ConfigJoinMapper() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Map<String,Integer> |
getColumnIndex(ResultSetMetaData rsmd) |
List |
mapping(ExecuteContext ctx,
Class target,
ResultSet resultSet,
Annotation config)
将数据库查询结果集ResultSet映射到一个对象上,对象通过target指定
|
protected abstract AttrNode |
parse(ExecuteContext ctx,
Class target,
ResultSetMetaData rsmd,
Annotation config)
子类继承,根据映射配置获得一个树结构,需要考虑缓存以避免每次解析
|
public List mapping(ExecuteContext ctx, Class target, ResultSet resultSet, Annotation config)
ResultSetMappermapping 在接口中 ResultSetMapperconfig - 实现了ProviderConfig注解的注解,如果没有,则为空protected Map<String,Integer> getColumnIndex(ResultSetMetaData rsmd) throws SQLException
SQLExceptionprotected abstract AttrNode parse(ExecuteContext ctx, Class target, ResultSetMetaData rsmd, Annotation config) throws Exception
target - rsmd - SQLExceptionExceptionCopyright © 2021. All rights reserved.