| java.lang.Object org.apache.beehive.controls.system.jdbc.RowMapperFactory
RowMapperFactory | final public class RowMapperFactory (Code) | | Factory for creating row mappers.
Row mapper types supported by this factory include: HashMap, Map, Object, XmlObject. The factory determines the
proper row mapper to use by checking its List of RowMappers against the type of mapping requested. When performing
the lookup, the factory attempts to find the most specific type match. If a match can't be found the most general
type of RowMapper is returned, RowToObjectMapper.
|
addRowMapping | public static void addRowMapping(Class returnTypeClass, Class<? extends RowMapper> rowMapperClass)(Code) | | Add a new row mapper to the list of available row mappers. The getRowMapper method traverses the
list of mappers from beginning to end, checking to see if a mapper can handle the specified
returnTypeClass. There is a default mapper which is used if a match cannot be found in the list.
Parameters: returnTypeClass - Class which this mapper maps a row to. Parameters: rowMapperClass - The row mapper class. |
getRowMapper | public static RowMapper getRowMapper(ResultSet rs, Class returnTypeClass, Calendar cal)(Code) | | Get a RowMapper instance which knows how to map a ResultSet row to the given return type.
Parameters: rs - The ResultSet to map. Parameters: returnTypeClass - The class to map a ResultSet row to. Parameters: cal - Calendar instance for mapping date/time values. A RowMapper instance. |
removeRowMapping | public static Class<? extends RowMapper> removeRowMapping(Class returnTypeClass)(Code) | | remove the row mapping for the specified class type.
Parameters: returnTypeClass - the RowMapper class which was removed, null if returnTypeClass did not match any of the registeredrow mappers. |
replaceRowMapping | public static Class<? extends RowMapper> replaceRowMapping(Class returnTypeClass, Class<? extends RowMapper> rowMapperClass)(Code) | | Replace a row mapping.
Parameters: returnTypeClass - Class which this mapper maps a row to. Parameters: rowMapperClass - The row mapper class. if the mapper was replaced, false mapper for returnTypeClass was not found, no action taken. |
setDefaultRowMapping | public static Class<? extends RowMapper> setDefaultRowMapping(Class<? extends RowMapper> rowMapperClass)(Code) | | Sets the rowmapper for Object.class
Parameters: rowMapperClass - |
setDefaultXmlRowMapping | public static Class<? extends RowMapper> setDefaultXmlRowMapping(Class mapToClass, Class<? extends RowMapper> rowMapperClass)(Code) | | Sets the rowmapper for XmlObject.class
Parameters: rowMapperClass - |
|
|