Arch4J 1.1

org.arch4j.dataaccess.visitors
Class ResultSetCache

java.lang.Object
  |
  +--CachedRowSet
        |
        +--org.arch4j.dataaccess.visitors.ResultSetCache
All Implemented Interfaces:
ResultSetVisitor

public class ResultSetCache
extends CachedRowSet
implements ResultSetVisitor

This visitor will "cache" the values from a result set so that they may be passed around without having to keep a connection open, etc. Download CachedRowSet

Version:
1.1
Author:
James Roome, Allan Wick
See Also:
Serialized Form

Constructor Summary
ResultSetCache()
          Constructs a new default CachedRowSet object
 
Method Summary
 int getNumberOfRows()
          Number of rows in the cache.
 int getNumberOfRowsAffected()
          Gets the number of rows affected by the sql.
 boolean processNextRow(ResultSet aResultSet)
          Process the next row of the SQL query.
 void setNumberOfRowsAffected(int aNumberAffected)
          Sets the number of rows affected by the sql.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetCache

public ResultSetCache()
               throws SQLException
Constructs a new default CachedRowSet object

Throws:
SQLException - Creation exception
Method Detail

processNextRow

public boolean processNextRow(ResultSet aResultSet)
Process the next row of the SQL query.

Specified by:
processNextRow in interface ResultSetVisitor
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()
Number of rows in the cache.

Returns:
the number of rows in the cache

setNumberOfRowsAffected

public void setNumberOfRowsAffected(int aNumberAffected)
Sets the number of rows affected by the sql.

Specified by:
setNumberOfRowsAffected in interface ResultSetVisitor
Parameters:
aNumberAffected - The number of rows that have been affected.

getNumberOfRowsAffected

public int getNumberOfRowsAffected()
Gets the number of rows affected by the sql.

Returns:
The number of rows that have been affected by the sql call.

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.