net.sf.saffron.runtime
Class ResultSetIterator

java.lang.Object
  |
  +--net.sf.saffron.runtime.ResultSetIterator
All Implemented Interfaces:
Iterator

public class ResultSetIterator
extends Object
implements Iterator

A ResultSetIterator is an adapter which converts a ResultSet to a Iterator.


Field Summary
protected  ResultSet resultSet
           
private  Object row
           
 
Constructor Summary
ResultSetIterator(ResultSet resultSet)
           
 
Method Summary
 boolean hasNext()
           
protected  Object makeRow()
          Creates an object representing the current row of the result set.
private  void moveToNext()
           
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resultSet

protected ResultSet resultSet

row

private Object row
Constructor Detail

ResultSetIterator

public ResultSetIterator(ResultSet resultSet)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

makeRow

protected Object makeRow()
                  throws SQLException
Creates an object representing the current row of the result set. The default implementation of this method returns a Row, but derived classes may override this.

SQLException

moveToNext

private void moveToNext()

SourceForge.net_Logo