com.boylesoftware.cb2
Interface ResultSetFieldProcessor

All Superinterfaces:
DAOPlugin

public interface ResultSetFieldProcessor
extends DAOPlugin

Interface for DAO plugins that perform additional processing of data from result set columns just before they get set into DM fields during a DAO fetch call.

Multiple ResultSetFieldProcessor plugins can be installed for one DAO. In this case they will be called in the order, in which their <plugin> elements appear in the DAO configuration. Each processor gets at its input value returned by the previous one.

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

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

Method Summary
 java.lang.Object processResultSetField(java.lang.String fieldName, java.lang.Class fieldClass, java.lang.Object value)
          This method is called by the DAO just before a value from a result set column gets set into a DM field.
 
Methods inherited from interface com.boylesoftware.cb2.DAOPlugin
setApplicationContext
 

Method Detail

processResultSetField

public java.lang.Object processResultSetField(java.lang.String fieldName,
                                              java.lang.Class fieldClass,
                                              java.lang.Object value)
                                       throws BLException
This method is called by the DAO just before a value from a result set column gets set into a DM field. The method returns an object, which will be actually used by the DAO and set into the DM.

Note, that if this method returns an object, which has type incomaptible with the target DM field, the DAO will throw an IllegalArgumentException runtime exception when it tries to actually set it.

Parameters:
fieldName - name of the target DM field.
fieldClass - type of the target DM field. When the DM is a DynamicDataModel, generic Object class is passed from the DAO.
value - the original value intended to be set into the DM field.
Returns:
value to be actually set into the DM field.
Throws:
BLException - if an unexpected error happens.


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