Arch4J 1.1

org.arch4j.dataaccess.visitors
Class ResultSetAdapter

java.lang.Object
  |
  +--org.arch4j.dataaccess.visitors.ResultSetAdapter
All Implemented Interfaces:
ResultSetVisitor
Direct Known Subclasses:
BaseDomainMapper.BaseDomainResultSetVisitor, IntResultSetAdapter, ResultSetCounter, ResultSetPrinter

public class ResultSetAdapter
extends Object
implements ResultSetVisitor

The default implementation of the ResultSetListener. This class may be subclassed by users and only override those methods that they are interested in. This may also provide an upgrade path since new methods may be added to the listener and implemented by the adapter without affecting existing code.

Version:
1.0
Author:
Allan Wick

Constructor Summary
ResultSetAdapter()
           
 
Method Summary
 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

ResultSetAdapter

public ResultSetAdapter()
Method Detail

processNextRow

public boolean processNextRow(ResultSet aResultSet)
Process the next row of the SQL query. The default is to just keep processing each row.

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.

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.