Class ResultSetIterator

All Implemented Interfaces:

public abstract class ResultSetIterator
extends java.lang.Object
implements ResultSetProcessor

An Implementation of the ResultSetIterator interface. This convenience implementation iterates through the entire ResultSet and calls the method forEachRow for each row (pun intended :) ). While that is not the only reasonable way to handle a ResultSet, it is common enough to warrant special support as provided by this class.

Constructor Summary
Method Summary
abstract  void forEachRow(java.sql.ResultSet rs)
          This template method is called for each row of the ResultSet.
 void process(java.sql.ResultSet rs)
          This method is called by the framework.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ResultSetIterator()
Method Detail


public abstract void forEachRow(java.sql.ResultSet rs)
                         throws java.sql.SQLException
This template method is called for each row of the ResultSet. Implement this method to specify how the ResultSet is to be handled.
CAUTION: The methods "close" and "next" MUST not be called on the ResultSet in this method. Iteration and closing of the ResultSet is done by the framework!


public final void process(java.sql.ResultSet rs)
                   throws java.sql.SQLException
This method is called by the framework. This method iterates through the ResultSet and calls forEachRow for each row (pun intended).
Specified by:
process in interface ResultSetProcessor

Copyright (c) 2001, 2002 by Jan Hermanns and Arno Haase. All Rights Reserved.