com.github.drinkjava2.jdbpro.handler
Class TitleArrayListHandler
java.lang.Object
com.github.drinkjava2.jdbpro.handler.TitleArrayListHandler
- All Implemented Interfaces:
- org.apache.commons.dbutils.ResultSetHandler<List<Object[]>>
public class TitleArrayListHandler
- extends Object
- implements org.apache.commons.dbutils.ResultSetHandler<List<Object[]>>
TitledArrayResultHandler transfer ResultSet to a List of Object[], first row
is titles, other rows are data
A result set:
name, age
tom, 5
sam, 6
be transfered to:
First list item: object[]{"name", "age"}
2nd list item: object[]{"tom", 5}
3rd list item: object[]{"sam", 6}
- Since:
- 1.7.0.2
- Author:
- Yong Zhu
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TitleArrayListHandler
public TitleArrayListHandler()
handle
public List<Object[]> handle(ResultSet rs)
throws SQLException
- Specified by:
handle in interface org.apache.commons.dbutils.ResultSetHandler<List<Object[]>>
- Throws:
SQLException
toArray
public Object[] toArray(ResultSet rs,
int cols)
throws SQLException
- Throws:
SQLException
Copyright © 2018. All rights reserved.