org.apache.beehive.controls.system.jdbc
Class DefaultObjectResultSetMapper
Object
ResultSetMapper
DefaultObjectResultSetMapper
- Direct Known Subclasses:
- DefaultXmlObjectResultSetMapper
public class DefaultObjectResultSetMapper
- extends ResultSetMapper
Default ResultSetMapper implementation for Objects.
Method Summary |
protected Object |
arrayFromResultSet(ResultSet rs,
int maxRows,
Class arrayClass,
Calendar cal)
Invoked when the return type of the method is an array type. |
Object |
mapToResultType(ControlBeanContext context,
Method m,
ResultSet resultSet,
Calendar cal)
Map the ResultSet to the method's return type. |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_tmf
protected static final TypeMappingsFactory _tmf
- static reference to the TypeMappingsFactory for this class
DefaultObjectResultSetMapper
public DefaultObjectResultSetMapper()
mapToResultType
public Object mapToResultType(ControlBeanContext context,
Method m,
ResultSet resultSet,
Calendar cal)
- Map the ResultSet to the method's return type. The object type returned is defined by the return type of the method.
- Specified by:
mapToResultType
in class ResultSetMapper
- Parameters:
context
- A ControlBeanContext instance, see Beehive controls javadoc for additional informationm
- Method assoicated with this call.resultSet
- Result set to map.cal
- A Calendar instance for time/date value resolution.
- Returns:
- The Object resulting from the ResultSet
arrayFromResultSet
protected Object arrayFromResultSet(ResultSet rs,
int maxRows,
Class arrayClass,
Calendar cal)
throws SQLException
- Invoked when the return type of the method is an array type.
- Parameters:
rs
- ResultSet to process.maxRows
- The maximum size of array to create, a value of 0 indicates that the array
size will be the same as the result set size (no limit).arrayClass
- The class of object contained within the arraycal
- A calendar instance to use for date/time values
- Returns:
- An array of the specified class type
- Throws:
SQLException
- On error.