|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
RowProcessor
implementations convert
ResultSet
rows into various other objects. Implementations
can extend BasicRowProcessor
to protect themselves
from changes to this interface.
BasicRowProcessor
Method Summary | |
java.lang.Object[] |
toArray(java.sql.ResultSet rs)
Create an Object[] from the column values in one
ResultSet row. |
java.lang.Object |
toBean(java.sql.ResultSet rs,
java.lang.Class type)
Create a JavaBean from the column values in one ResultSet
row. |
java.util.List |
toBeanList(java.sql.ResultSet rs,
java.lang.Class type)
Create a List of JavaBeans from the column values in all
ResultSet rows. |
java.util.Map |
toMap(java.sql.ResultSet rs)
Create a Map from the column values in one
ResultSet row. |
Method Detail |
public java.lang.Object[] toArray(java.sql.ResultSet rs) throws java.sql.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
java.sql.SQLException
- if a database access error occurspublic java.lang.Object toBean(java.sql.ResultSet rs, java.lang.Class type) throws java.sql.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
.
rs
- ResultSet that supplies the bean datatype
- Class from which to create the bean instance
java.sql.SQLException
- if a database access error occurspublic java.util.List toBeanList(java.sql.ResultSet rs, java.lang.Class type) throws java.sql.SQLException
List
of JavaBeans from the column values in all
ResultSet
rows. ResultSet.next()
should
not be called before passing it to this method.
rs
- 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
.
java.sql.SQLException
- if a database access error occurspublic java.util.Map toMap(java.sql.ResultSet rs) throws java.sql.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
java.sql.SQLException
- if a database access error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |