|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RowProcessor
RowProcessor implementations convert
ResultSet rows into various other objects. Implementations
can extend BasicRowProcessor to protect themselves
from changes to this interface.
BasicRowProcessor| Method Summary | ||
|---|---|---|
Object[] |
toArray(ResultSet rs)
Create an Object[] from the column values in one
ResultSet row. |
|
|
toBean(ResultSet rs,
Class<T> type)
Create a JavaBean from the column values in one ResultSet
row. |
|
|
toBeanList(ResultSet rs,
Class<T> type)
Create a List of JavaBeans from the column values in all
ResultSet rows. |
|
Map<String,Object> |
toMap(ResultSet rs)
Create a Map from the column values in one
ResultSet row. |
|
| Method Detail |
|---|
Object[] toArray(ResultSet rs)
throws SQLException
Object[] from the column values in one
ResultSet row. The ResultSet should be
positioned on a valid row before passing it to this method.
Implementations of this method must not alter the row position of
the ResultSet.
rs - ResultSet that supplies the array data
SQLException - if a database access error occurs
<T> T toBean(ResultSet rs,
Class<T> type)
throws SQLException
ResultSet
row. The ResultSet should be positioned on a valid row before
passing it to this method. Implementations of this method must not
alter the row position of the ResultSet.
T - The type of bean to creaters - ResultSet that supplies the bean datatype - Class from which to create the bean instance
SQLException - if a database access error occurs
<T> List<T> toBeanList(ResultSet rs,
Class<T> type)
throws SQLException
List of JavaBeans from the column values in all
ResultSet rows. ResultSet.next() should
not be called before passing it to this method.
T - The type of bean to creaters - ResultSet that supplies the bean datatype - Class from which to create the bean instance
List of beans with the given type in the order
they were returned by the ResultSet.
SQLException - if a database access error occurs
Map<String,Object> toMap(ResultSet rs)
throws SQLException
Map from the column values in one
ResultSet row. The ResultSet should be
positioned on a valid row before
passing it to this method. Implementations of this method must not
alter the row position of the ResultSet.
rs - ResultSet that supplies the map data
SQLException - if a database access error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||