| java.lang.Object org.apache.commons.beanutils.JDBCDynaClass
All known Subclasses: org.apache.commons.beanutils.ResultSetDynaClass, org.apache.commons.beanutils.RowSetDynaClass,
JDBCDynaClass | abstract class JDBCDynaClass implements DynaClass,Serializable(Code) | | Provides common logic for JDBC implementations of
DynaClass .
author: Craig R. McClanahan author: George Franciscus version: $Revision: 557031 $ $Date: 2007-07-17 20:12:54 +0100 (Tue, 17 Jul 2007) $ |
lowerCase | protected boolean lowerCase(Code) | | Flag defining whether column names should be lower cased when
converted to property names.
|
propertiesMap | protected Map propertiesMap(Code) | | The set of dynamic properties that are part of this
DynaClass , keyed by the property name. Individual descriptor
instances will be the same instances as those in the
properties list.
|
createDynaProperty | protected DynaProperty createDynaProperty(ResultSetMetaData metadata, int i) throws SQLException(Code) | | Factory method to create a new DynaProperty for the given index
into the result set metadata.
Parameters: metadata - is the result set metadata Parameters: i - is the column index in the metadata the newly created DynaProperty instance throws: SQLException - If an error occurs accessing the SQL metadata |
getColumnName | protected String getColumnName(String name)(Code) | | Get the table column name for the specified property name.
Parameters: name - The property name The column name (which can be different if the lowerCaseoption is used). |
getDynaProperties | public DynaProperty[] getDynaProperties()(Code) | | Return an array of ProperyDescriptors for the properties
currently defined in this DynaClass. If no properties are defined, a
zero-length array will be returned.
|
getDynaProperty | public DynaProperty getDynaProperty(String name)(Code) | | Return a property descriptor for the specified property, if it
exists; otherwise, return null .
Parameters: name - Name of the dynamic property for which a descriptoris requested exception: IllegalArgumentException - if no property name is specified |
getName | public String getName()(Code) | | Return the name of this DynaClass (analogous to the
getName() method of java.lang.Class DynaClass implementation class to support
different dynamic classes, with different sets of properties.
|
introspect | protected void introspect(ResultSet resultSet) throws SQLException(Code) | | Introspect the metadata associated with our result set, and populate
the properties and propertiesMap instance
variables.
Parameters: resultSet - The resultSet whose metadata is tobe introspected exception: SQLException - if an error is encountered processing theresult set metadata |
loadClass | protected Class loadClass(String className) throws SQLException(Code) | | Loads and returns the Class of the given name.
By default, a load from the thread context class loader is attempted.
If there is no such class loader, the class loader used to load this
class will be utilized.
Parameters: className - The name of the class to load The loaded class exception: SQLException - if an exception was thrown trying to loadthe specified class |
newInstance | public DynaBean newInstance() throws IllegalAccessException, InstantiationException(Code) | | Instantiate and return a new DynaBean instance, associated
with this DynaClass. NOTE - This operation is not
supported, and throws an exception.
exception: IllegalAccessException - if the Class or the appropriateconstructor is not accessible exception: InstantiationException - if this Class represents an abstractclass, an array class, a primitive type, or void; or if instantiationfails for some other reason |
|
|