com.boylesoftware.cb2
Interface FetchResultProcessor
- public interface FetchResultProcessor
Classes that implement this interface can be passed along with a DAO fetch
call to be installed into the DAO's result set processing loop to perform
certain operations on the DMs as they are coming out of the DAO and before
they get packed into an array and returned back to the caller. These fetch
result processors need to be wrapped into
FetchResultProcessorHandler
objects before used with a fetch
call. The FetchResultProcessorHandler
allows to install the
processor on a certain DM nesting level, so it is called only for the DMs
formed on that level.
- Version:
- $Id: FetchResultProcessor.java,v 1.2 2004/04/20 16:00:58 levahim Exp $
- Author:
- Lev Himmelfarb
- See Also:
FetchResultProcessorHandler
,
DAO.fetch(String, Set, Object [], String [], int, int, int, FetchResultProcessorHandler [], FetchResultDescriptor)
Method Summary |
DataModel |
processDM(DataModel dm,
java.sql.ResultSet rs,
int firstColumnIndex,
int lastColumnIndex)
Called by the DAO for each DM on a certain DM nesting level just after
it has processed a result set row and populated the DM's fields. |
processDM
public DataModel processDM(DataModel dm,
java.sql.ResultSet rs,
int firstColumnIndex,
int lastColumnIndex)
throws BLException,
java.sql.SQLException
- Called by the DAO for each DM on a certain DM nesting level just after
it has processed a result set row and populated the DM's fields.
- Parameters:
dm
- the DM created an populated by the DAO.rs
- reference to the result set.firstColumnIndex
- index of a column in the result set, which is
the first column that belongs to the DM.lastColumnIndex
- index of a column in the result set, which is
the last column that belongs to the DM.
- Returns:
- DM, which has to be taken by the DAO as the result of the row
processing. If the implementation returns
null
, the DAO
unconditionally aborts current row processing and nothing is added to the
resulting array of DMs for this row. If multiple processors are
installed on the same nesting level, others do not get called if one of
them returns null
.
- Throws:
java.sql.SQLException
- if a database error happens.
BLException
- if a serious error happens during the DM processing.
Copyright © 2002,2003,2004 - Boyle Software, Inc.