java.lang.Object
org.seppiko.commons.utils.jdbc.ResultUtil
JDBC ResultSet Util
- Author:
- Leonard Woo
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ResultUtil
public ResultUtil()
-
-
Method Details
-
convert
Convert ResultSet to List of Map- Parameters:
resultSet- ResultSet Object- Returns:
- List of Map, value type is sql type
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
convert
public static <T> ArrayList<T> convert(ResultSet resultSet, Class<T> clazz) throws SQLException, IllegalAccessException Convert ResultSet to object list- Type Parameters:
T- object type- Parameters:
resultSet- ResultSet Objectclazz- object class- Returns:
- object list
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result setIllegalAccessException- target object build failed
-