|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.apache.commons.dbutils.BeanProcessor
public class BeanProcessor
BeanProcessor matches column names to bean property names
and converts ResultSet columns into objects for those bean
properties. Subclasses should override the methods in the processing chain
to customize behavior.
This class is thread-safe.
BasicRowProcessor| コンストラクタの概要 | |
|---|---|
BeanProcessor()
Constructor for BeanProcessor. |
|
| メソッドの概要 | |
|---|---|
java.lang.Object |
toBean(java.sql.ResultSet rs,
java.lang.Class type)
Convert a ResultSet row into a JavaBean. |
java.util.List |
toBeanList(java.sql.ResultSet rs,
java.lang.Class type)
Convert a ResultSet into a List of JavaBeans. |
| クラス java.lang.Object から継承されたメソッド |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public BeanProcessor()
| メソッドの詳細 |
|---|
public java.lang.Object toBean(java.sql.ResultSet rs,
java.lang.Class type)
throws java.sql.SQLException
ResultSet row into a JavaBean. This
implementation uses reflection and BeanInfo classes to
match column names to bean property names. Properties are matched to
columns based on several factors:
Primitive bean properties are set to their defaults when SQL NULL is
returned from the ResultSet. Numeric fields are set to 0
and booleans are set to false. Object bean properties are set to
null when SQL NULL is returned. This is the same behavior
as the ResultSet get* methods.
rs - ResultSet that supplies the bean datatype - Class from which to create the bean instance
java.sql.SQLException - if a database access error occurs
public java.util.List toBeanList(java.sql.ResultSet rs,
java.lang.Class type)
throws java.sql.SQLException
ResultSet into a List of JavaBeans.
This implementation uses reflection and BeanInfo classes to
match column names to bean property names. Properties are matched to
columns based on several factors:
Primitive bean properties are set to their defaults when SQL NULL is
returned from the ResultSet. Numeric fields are set to 0
and booleans are set to false. Object bean properties are set to
null when SQL NULL is returned. This is the same behavior
as the ResultSet get* methods.
rs - ResultSet that supplies the bean datatype - Class from which to create the bean instance
java.sql.SQLException - if a database access error occurs
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||