org.arch4j.dataaccess.visitors
Class ResultSetCounter
java.lang.Object
|
+--org.arch4j.dataaccess.visitors.ResultSetAdapter
|
+--org.arch4j.dataaccess.visitors.ResultSetCounter
- All Implemented Interfaces:
- ResultSetVisitor
- public class ResultSetCounter
- extends ResultSetAdapter
This Listener may be used to count the number of rows returned from a result set.
It currently spins through the result set and counts the rows. It was done this
way so that it could be subclassed and used to count the number of rows processed
by the sub-classed listener.
- Version:
- 1.0
- Author:
- Allan Wick
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResultSetCounter
public ResultSetCounter()
processNextRow
public boolean processNextRow(ResultSet aResultSet)
- Each time through the result set, add one to the count of rows. By processing
in this manner, sub-classses can be created to add more functionality.
- Specified by:
processNextRow
in interface ResultSetVisitor
- Overrides:
processNextRow
in class ResultSetAdapter
- Parameters:
aResultSet
- The result set to process. The cursor is in the proper position.
- Returns:
- true if the processor should keep spinning through the result set.
getNumberOfRows
public int getNumberOfRows()
- Gets the number of rows processed.
- Returns:
- The number of rows processed.
Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.