toolbox.dao
Interface ListBuilder

Package class diagram package ListBuilder
All Known Implementing Classes:
AppListBuilder, AppOraListBuilder, ListBuilderImpl, OracleListBuilder

public interface ListBuilder

Defines an interface that will be used to implement classes to construct lists from java.sql.ResultSet instances.

This is done to provide a mechanism to perform database specific type conversions.


Method Summary
 java.util.List buildList(java.sql.ResultSet rs)
          Construct a list from the given ResultSet and perform database specific type conversions where required.
 java.util.List buildList(java.sql.ResultSet rs, java.lang.Class returnType)
          Construct a list from the given ResultSet and perform database specific type conversions where required.
 

Method Detail

buildList

java.util.List buildList(java.sql.ResultSet rs)
                         throws java.sql.SQLException
Construct a list from the given ResultSet and perform database specific type conversions where required.

Parameters:
rs - ResultSet to use.
Returns:
List containing ResultSet data.
Throws:
java.sql.SQLException - if the ResultSet cannot be accessed.

buildList

java.util.List buildList(java.sql.ResultSet rs,
                         java.lang.Class returnType)
                         throws java.sql.SQLException,
                                DaoException
Construct a list from the given ResultSet and perform database specific type conversions where required.

In addition result entries are wrapped as instances of the specified return type.

Parameters:
rs - ResultSet to use.
returnType - Class denoting the return type.
Throws:
java.sql.SQLException - if the ResultSet cannot be accessed.
DaoException - if the results cannot be wrapped as the specified return type.