Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javatools.db
Class DbCachedIterator  view DbCachedIterator download DbCachedIterator.java

java.lang.Object
  extended byjavatools.db.DbTableIterator
      extended byjavatools.db.DbCachedIterator
All Implemented Interfaces:
DbIterator, java.util.Iterator

public class DbCachedIterator
extends DbTableIterator

A class to represent a "cached" DbIterator, that is an iterator that can be called more than once.

Version:
0.0.1

Field Summary
private  java.util.Iterator resultIt
           
 
Fields inherited from class javatools.db.DbTableIterator
last, lastException, table
 
Constructor Summary
DbCachedIterator(DbCachedTable table)
          Creates new DbCachedIterator
 
Method Summary
 boolean hasNext()
          Checks if this iterator has a value after the current one.
 boolean hasNextRow()
          Are there more rows to iterator through?
 java.lang.Object next()
          Takes the next object from the iterator.
 DbRow nextRow()
          Get the next DbRow in the table.
 void remove()
          Removes the current element in the iterator.
 
Methods inherited from class javatools.db.DbTableIterator
getNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resultIt

private java.util.Iterator resultIt
Constructor Detail

DbCachedIterator

public DbCachedIterator(DbCachedTable table)
Creates new DbCachedIterator

Method Detail

hasNext

public boolean hasNext()
Checks if this iterator has a value after the current one.

Specified by:
hasNext in interface java.util.Iterator
Overrides:
hasNext in class DbTableIterator

hasNextRow

public boolean hasNextRow()
                   throws DbException
Are there more rows to iterator through?

Specified by:
hasNextRow in interface DbIterator
Overrides:
hasNextRow in class DbTableIterator

next

public java.lang.Object next()
Takes the next object from the iterator.

Specified by:
next in interface java.util.Iterator
Overrides:
next in class DbTableIterator

nextRow

public DbRow nextRow()
              throws DbException
Get the next DbRow in the table.

Specified by:
nextRow in interface DbIterator
Overrides:
nextRow in class DbTableIterator

remove

public void remove()
Removes the current element in the iterator.

Specified by:
remove in interface DbIterator
Overrides:
remove in class DbTableIterator