public class HandleHelper extends Object
Constructor and Description |
---|
HandleHelper() |
Modifier and Type | Method and Description |
---|---|
static Entity |
handleRow(int columnCount,
ResultSetMetaData meta,
ResultSet rs)
处理单条数据
|
static Entity |
handleRow(int columnCount,
ResultSetMetaData meta,
ResultSet rs,
boolean caseInsensitive)
处理单条数据
|
static <T> T |
handleRow(int columnCount,
ResultSetMetaData meta,
ResultSet rs,
Class<T> beanClass)
处理单条数据
|
static <T> T |
handleRow(int columnCount,
ResultSetMetaData meta,
ResultSet rs,
T bean)
处理单条数据
|
static Entity |
handleRow(ResultSet rs)
处理单条数据
|
static <T extends Entity> |
handleRow(T row,
int columnCount,
ResultSetMetaData meta,
ResultSet rs,
boolean withMetaInfo)
处理单条数据
|
static List<Object> |
handleRowToList(ResultSet rs)
处理单行数据
|
static <T extends Collection<Entity>> |
handleRs(ResultSet rs,
T collection)
处理多条数据
|
static <T extends Collection<Entity>> |
handleRs(ResultSet rs,
T collection,
boolean caseInsensitive)
处理多条数据
|
static <E,T extends Collection<E>> |
handleRsToBeanList(ResultSet rs,
T collection,
Class<E> elementBeanType)
处理多条数据并返回一个Bean列表
|
public static <T> T handleRow(int columnCount, ResultSetMetaData meta, ResultSet rs, T bean) throws SQLException
T
- Bean类型columnCount
- 列数meta
- ResultSetMetaDatars
- 数据集bean
- 目标BeanSQLException
- SQL执行异常public static <T> T handleRow(int columnCount, ResultSetMetaData meta, ResultSet rs, Class<T> beanClass) throws SQLException
T
- Bean类型columnCount
- 列数meta
- ResultSetMetaDatars
- 数据集beanClass
- 目标Bean类型SQLException
- SQL执行异常public static Entity handleRow(int columnCount, ResultSetMetaData meta, ResultSet rs) throws SQLException
columnCount
- 列数meta
- ResultSetMetaDatars
- 数据集SQLException
- SQL执行异常public static Entity handleRow(int columnCount, ResultSetMetaData meta, ResultSet rs, boolean caseInsensitive) throws SQLException
columnCount
- 列数meta
- ResultSetMetaDatars
- 数据集caseInsensitive
- 是否大小写不敏感SQLException
- SQL执行异常public static <T extends Entity> T handleRow(T row, int columnCount, ResultSetMetaData meta, ResultSet rs, boolean withMetaInfo) throws SQLException
T
- Entity及其子对象row
- Entity对象columnCount
- 列数meta
- ResultSetMetaDatars
- 数据集withMetaInfo
- 是否包含表名、字段名等元信息SQLException
- SQL执行异常public static Entity handleRow(ResultSet rs) throws SQLException
rs
- 数据集SQLException
- SQL执行异常public static List<Object> handleRowToList(ResultSet rs) throws SQLException
rs
- 数据集(行)SQLException
- SQL执行异常public static <T extends Collection<Entity>> T handleRs(ResultSet rs, T collection) throws SQLException
T
- 集合类型rs
- 数据集collection
- 数据集SQLException
- SQL执行异常public static <T extends Collection<Entity>> T handleRs(ResultSet rs, T collection, boolean caseInsensitive) throws SQLException
T
- 集合类型rs
- 数据集collection
- 数据集caseInsensitive
- 是否大小写不敏感SQLException
- SQL执行异常public static <E,T extends Collection<E>> T handleRsToBeanList(ResultSet rs, T collection, Class<E> elementBeanType) throws SQLException
E
- 集合元素类型T
- 集合类型rs
- 数据集collection
- 数据集elementBeanType
- Bean类型SQLException
- SQL执行异常Copyright © 2024. All rights reserved.