This abstract base class should be used to implement classes that process one
row in a database query resulset. The fetch method of a
DbQueryManager requires an instance of a
DbRowProcessor and calls its processRow
method each time it is called.
The DbRowProcessor instance can then work with the result set
and extract all needed data. It is free to implement any logic to be
able to return the retrieved data in an acceptable form to the user.
A class that extends DbRowProcessor can for example take a
Template instance as the argument of its constructor and
progressively fill in each resulting row in a HTML table. This, without
having to maintain the query results in memory to be able to provide it to a
seperate method which is responsible for the handling of the output. Using a
DbRowProcessor thus allows for perfect seperation and
abstraction of result processing without having to be burdened with possible
large memory usage or large object allocation.
author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3634 $ See Also: DbRowProcessor.processRow(ResultSet resultSet) See Also: com.uwyn.rife.database.DbQueryManager since: 1.0 |