Interface COM.ibm.jaws.mofw.Iterator
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface COM.ibm.jaws.mofw.Iterator

public interface Iterator
extends Object
Iterators allow relative and random access to query results. Since a query can return indeterminate types of data, we chose an InputEDStream as the result of the methods. If this return is null, then there are no entries at that position or in that direction.

For "normal" scenarios, this makes for a very efficient programming model:

    Iterator i = collection.evaluateQuery("your select/where clause");
    InputEDStream s;
    while ((s = (InputEDStream)i.getNext() != null) {do whatever by s.readXXX();}

Most methods have a signature where an OutputEDStream can be passed in to be directly loaded (as if the Iterator was a Manageable object whose EDS consists of the items in the select clause of the query).

    Iterator i = collection.evaluateQuery("your select/where clause");
    OutputEDStream s = new MySpecialOutputStream(...);
    while (i.getNext(s)) {do whatever with s by its special methods;}
 

Method Index

 o getNext()
Use this method to get the next Object returned by the Iterator.
 o reset()

Methods

 o getNext
  public abstract Object getNext()
Use this method to get the next Object returned by the Iterator.
Returns:
an object that should be cast to the appropriate type based on the query. A null return indicates that there is no next entry.
 o reset
  public abstract void reset()

All Packages  Class Hierarchy  This Package  Previous  Next  Index