类 BeanPropertyRowMapper<T>
- java.lang.Object
-
- ai.yue.library.data.jdbc.support.BeanPropertyRowMapper<T>
-
- 所有已实现的接口:
org.springframework.jdbc.core.RowMapper<T>
public class BeanPropertyRowMapper<T> extends Object implements org.springframework.jdbc.core.RowMapper<T>
将每一行的结果集转换为指定 POJO 类型
两倍有余 BeanPropertyRowMapper 的性能,对比结果见 官网文档 说明。
支持更多类型映射,如:JSONObject、JSONArray
支持
JSONField注解- 从以下版本开始:
- 2020年11月2日
- 作者:
- ylyue
-
-
构造器概要
构造器 构造器 说明 BeanPropertyRowMapper(Class<T> mappedClass)Create a newBeanPropertyRowMapper, accepting unpopulated properties in the target bean.
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 TmapRow(ResultSet rs, int rowNum)static <T> BeanPropertyRowMapper<T>newInstance(Class<T> mappedClass)Static factory method to create a newBeanPropertyRowMapper(with the mapped class specified only once).
-
-
-
构造器详细资料
-
BeanPropertyRowMapper
public BeanPropertyRowMapper(Class<T> mappedClass)
Create a newBeanPropertyRowMapper, accepting unpopulated properties in the target bean.Consider using the
newInstance(java.lang.Class<T>)factory method instead, which allows for specifying the mapped type once only.- 参数:
mappedClass- the class that each row should be mapped to
-
-
方法详细资料
-
mapRow
public T mapRow(ResultSet rs, int rowNum) throws SQLException
- 指定者:
mapRow在接口中org.springframework.jdbc.core.RowMapper<T>- 抛出:
SQLException
-
newInstance
public static <T> BeanPropertyRowMapper<T> newInstance(Class<T> mappedClass)
Static factory method to create a newBeanPropertyRowMapper(with the mapped class specified only once).- 参数:
mappedClass- the class that each row should be mapped to
-
-