Version 4.10.0

hirondelle.web4j.database
Interface ConvertColumn

All Known Implementing Classes:
ConvertColumnImpl

public interface ConvertColumn

Convert ResultSet column values into common 'building block' objects.

Here, a building block class is one of the 'base' objects from which Model Objects can in turn be built - Integer, BigDecimal, Date, and so on.

See BuildImpl for important information on how this item is configured. BuildImpl.forConvertColumn() returns the configured implementation of this interface.

ConvertColumnImpl is provided as a default implementation. It is likely that most applications will find this implementation adequate.


Method Summary
<T> T
convert(ResultSet aRow, int aColumnIdx, Class<T> aSupportedTargetType)
          Translate a single column value of a ResultSet into a possibly-null 'building block' object.
 

Method Detail

convert

<T> T convert(ResultSet aRow,
              int aColumnIdx,
              Class<T> aSupportedTargetType)
          throws SQLException
Translate a single column value of a ResultSet into a possibly-null 'building block' object.

A building block object is like Integer, BigDecimal, Date, and so on.

It is required that implementations use ConvertParam.isSupported(Class) to verify that aSupportedTargetType is indeed supported. This ensures the front end and back end are synchronized, and support the same set of classes.

Parameters:
aRow - from iteration over a ResultSet.
aColumnIdx - specific column in aRow.
aSupportedTargetType - class of the desired return value. Implementations are not required to support all possible target classes.
Throws:
SQLException

Version 4.10.0

Copyright Hirondelle Systems. Published October 19, 2013 - User Guide - All Docs.