| java.lang.Object org.apache.beehive.controls.system.jdbc.RowMapper
All known Subclasses: org.apache.beehive.controls.system.jdbc.RowToMapMapper, org.apache.beehive.controls.system.jdbc.RowToHashMapMapper, org.apache.beehive.controls.system.jdbc.RowToXmlObjectMapper, org.apache.beehive.controls.system.jdbc.RowToObjectMapper,
RowMapper | abstract public class RowMapper (Code) | | Abstract base class for all row mappers.
RowMappers are used to map the contents of a row in a ResultSet to the return type of an annotated method.
Supported RowMapper types include: HashMap, Map, Object, XmlObject. When a ResultSetMapper is ready to
map a ResultSet row to an object, it requests a RowMapper for the return type of the method from the
RowMapperFactory.
|
Constructor Summary | |
protected | RowMapper(ResultSet resultSet, Class> returnTypeClass, Calendar cal) Create a new RowMapper for the specified ResultSet and return type Class. |
Method Summary | |
protected Object | extractColumnValue(int index, int resultType) Extract a column value from the ResultSet and return it as resultType.
Parameters: index - The column index of the value to extract from the ResultSet. Parameters: resultType - The return type. | protected String[] | getKeysFromResultSet() Build a String array of column names from the ResultSet. | protected boolean | isSetterMethod(Method method) Determine if the given method is a java bean setter method. | abstract public Object | mapRowToReturnType() |
_cal | final protected Calendar _cal(Code) | | Calendar instance for date/time mappings.
|
_returnTypeClass | final protected Class> _returnTypeClass(Code) | | Class to map ResultSet Rows to.
|
RowMapper | protected RowMapper(ResultSet resultSet, Class> returnTypeClass, Calendar cal)(Code) | | Create a new RowMapper for the specified ResultSet and return type Class.
Parameters: resultSet - ResultSet to map Parameters: returnTypeClass - Class to map ResultSet rows to. Parameters: cal - Calendar instance for date/time values. |
extractColumnValue | protected Object extractColumnValue(int index, int resultType) throws SQLException(Code) | | Extract a column value from the ResultSet and return it as resultType.
Parameters: index - The column index of the value to extract from the ResultSet. Parameters: resultType - The return type. Defined in TypeMappingsFactory. The extracted value throws: java.sql.SQLException - on error. |
getKeysFromResultSet | protected String[] getKeysFromResultSet() throws SQLException(Code) | | Build a String array of column names from the ResultSet.
A String array containing the column names contained within the ResultSet. throws: SQLException - on error |
isSetterMethod | protected boolean isSetterMethod(Method method)(Code) | | Determine if the given method is a java bean setter method.
Parameters: method - Method to check True if the method is a setter method. |
mapRowToReturnType | abstract public Object mapRowToReturnType()(Code) | | Map a ResultSet row to the return type class
An instance of class. |
|
|