com.boylesoftware.cb2
Interface ResultSetFieldGetter

All Superinterfaces:
DAOPlugin

public interface ResultSetFieldGetter
extends DAOPlugin

Interface for the DAO plugin, which is responsible for getting column values from the result set during a DAO fetch call. The DAO calls this plugin whenever it needs a column's value from a result set to be set into a DM.

Only one plugin of this type can be installed in a DAO configuration. If none installed, the DAO will use a simple internal implementation, which calls getObject on the java.sql.ResultSet.

Note, that one instance of the plugin can be shared by multiple threads at the same time.

Version:
$Id: ResultSetFieldGetter.java,v 1.3 2004/05/12 15:41:17 levahim Exp $
Author:
Lev Himmelfarb

Method Summary
 java.lang.Object getResultSetField(java.sql.ResultSet rs, int columnIndex, java.lang.String dmFieldName, java.lang.Class dmFieldClass)
          Gets the specified column's value from the result set.
 
Methods inherited from interface com.boylesoftware.cb2.DAOPlugin
setApplicationContext
 

Method Detail

getResultSetField

public java.lang.Object getResultSetField(java.sql.ResultSet rs,
                                          int columnIndex,
                                          java.lang.String dmFieldName,
                                          java.lang.Class dmFieldClass)
                                   throws java.sql.SQLException
Gets the specified column's value from the result set.

Parameters:
rs - the result set.
columnIndex - the column index.
dmFieldName - name of the target DM field.
dmFieldClass - type of the target DM field. When the DM is a DynamicDataModel, generic Object class is passed from the DAO.
Returns:
value to be put into the DM field, can return null.
Throws:
java.sql.SQLException - if an error happens.


Copyright © 2002,2003,2004 - Boyle Software, Inc.