hirondelle.web4j.database
Class ConvertColumnImpl
Object
hirondelle.web4j.database.ConvertColumnImpl
- All Implemented Interfaces:
- ConvertColumn
public class ConvertColumnImpl
- extends Object
- implements ConvertColumn
Default implementation of ConvertColumn
, suitable for most applications.
This class converts non-null items using :
Target Class | Use |
SafeText | ResultSet.getString(), or ResultSet.getClob() |
String (if allowed) | ResultSet.getString(), or ResultSet.getClob() |
Integer | ResultSet.getInt() |
Long | ResultSet.getLong() |
Boolean | ResultSet.getBoolean() |
BigDecimal | ResultSet.getBigDecimal() |
Decimal | ResultSet.getBigDecimal() |
Id | ResultSet.getString(), new Id(String) |
DateTime | ResultSet.getString(), pass to DateTime.DateTime(String) |
Date | ResultSet.getTimestamp(), possibly with hint provided in web.xml |
Locale | ResultSet.getString(), Util.buildLocale(String) |
TimeZone | ResultSet.getString(), Util.buildTimeZone(String) |
InputStream | ResultSet.getBinaryStream() |
This implementation supports the same building block classes defined by another
default implementation : ConvertParamImpl.isSupported(Class)
.
See that class for important information on the conditional support of String.
Method Summary |
|
convert(ResultSet aRow,
int aColumnIdx,
Class<T> aSupportedTargetType)
Defines policies for converting a column of a ResultSet into a possibly-null
Object. |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConvertColumnImpl
public ConvertColumnImpl()
convert
public <T> T convert(ResultSet aRow,
int aColumnIdx,
Class<T> aSupportedTargetType)
throws SQLException
- Defines policies for converting a column of a ResultSet into a possibly-null
Object.
- Specified by:
convert
in interface ConvertColumn
- Parameters:
aRow
- of a ResultSetaColumnIdx
- particular column of aRowaSupportedTargetType
- is a class supported by the configured implementation of
ConvertParam.isSupported(Class)
.
- Throws:
SQLException
Copyright Hirondelle Systems. Published October 19, 2013 - User Guide - All Docs.