Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Interface dkFederatedIterator

All Superinterfaces:
dkIterator, DKSequentialIterator

public interface dkFederatedIterator
extends DKSequentialIterator

A federated iterator is used to iterate over the collective members of DKFederatedCollection across collection boundaries. The next() method will returns DDO objects until all collections are iterated over. This iterator is created by invoking the method createIterator() in the DKFederatedCollection object.

See Also:
dkIterator, DKSequentialIterator

Method Summary
 java.lang.Object at()
          Returns the current element in the collection without moving the iterator position.
 boolean more()
          Returns true if there are more elements in the DKFederatedCollection.
 java.lang.Object next()
          Returns the current element in the collection and advances the iterator to the next position.
 java.lang.Object previous()
          Returns the current element in the collection and moves the iterator backward one position.
 void reset()
          Resets the iterator to the beginning of DKFederatedCollection.
 boolean setToFirst()
          Set the iterator to the first element in this federated collection.
 boolean setToFirstCollection()
          Set the iterator to the first element in the first collection in this federated collection.
 boolean setToLast()
          Set the iterator to the last element in this federated collection.
 boolean setToLastCollection()
          Set the iterator to the last element in the last collection in this federated collection.
 boolean setToNext()
          Set the iterator to the next element in this federated collection.
 boolean setToNextCollection()
          Set the iterator to the first element in the next collection in this federated collection.
 boolean setToPrevious()
          Set the iterator to the previous element in this federated collection.
 boolean setToPreviousCollection()
          Set the iterator to the last element in the previous collection in this federated collection.
 

Method Detail

next

public java.lang.Object next()
                      throws DKUsageError
Returns the current element in the collection and advances the iterator to the next position. In case the element is a collection, it goes inside that collection and retrieves the first element recursively, until it finds an element which is not a collection. When the current collection is exhausted, this iterator wil find the next collection and extract the first element (non-collection) from it.
Specified by:
next in interface dkIterator
Throws:
DKUsageError - if already at the last item in collecction

reset

public void reset()
Resets the iterator to the beginning of DKFederatedCollection.
Specified by:
reset in interface dkIterator

more

public boolean more()
Returns true if there are more elements in the DKFederatedCollection. In this case, an element implicitly means a collection member which is not a collection (a leaf).
Specified by:
more in interface dkIterator
Following copied from interface: com.ibm.mm.sdk.common.dkIterator
Returns:
true or false.

previous

public java.lang.Object previous()
                          throws DKUsageError
Returns the current element in the collection and moves the iterator backward one position. In case the element is a collection, it goes inside that collection and retrieves the last element, until it finds an element which is not a collection. When the current collection is exhausted, this iterator will find the previous collection and extract the last element (non-collection) from it.
Specified by:
previous in interface DKSequentialIterator
Throws:
DKUsageError - if already at the first item in collecction

at

public java.lang.Object at()
                    throws DKUsageError
Returns the current element in the collection without moving the iterator position. The returned element is not a collection.
Specified by:
at in interface DKSequentialIterator
Throws:
DKUsage - if collection is empty, or current position is invalid

setToFirst

public boolean setToFirst()
Set the iterator to the first element in this federated collection. The first element is not a collection. Returns true if the operation is successful, otherwise it returns false.
Specified by:
setToFirst in interface DKSequentialIterator
Following copied from interface: com.ibm.mm.sdk.common.DKSequentialIterator
Returns:
true if position is valid.

setToLast

public boolean setToLast()
Set the iterator to the last element in this federated collection. The last element is not a collection. Returns true if the operation is successful, otherwise it returns false.
Specified by:
setToLast in interface DKSequentialIterator
Following copied from interface: com.ibm.mm.sdk.common.DKSequentialIterator
Returns:
true if position is valid.

setToNext

public boolean setToNext()
Set the iterator to the next element in this federated collection. The next element is not a collection. Returns true if the operation is successful, otherwise it returns false.
Specified by:
setToNext in interface DKSequentialIterator
Following copied from interface: com.ibm.mm.sdk.common.DKSequentialIterator
Returns:
true if position is valid.

setToPrevious

public boolean setToPrevious()
Set the iterator to the previous element in this federated collection. The previous element is not a collection. Returns true if the operation is successful, otherwise it returns false.
Specified by:
setToPrevious in interface DKSequentialIterator
Following copied from interface: com.ibm.mm.sdk.common.DKSequentialIterator
Returns:
true if position is valid.

setToFirstCollection

public boolean setToFirstCollection()
Set the iterator to the first element in the first collection in this federated collection. The first element is not a collection. Returns true if the operation is successful, otherwise it returns false.

setToLastCollection

public boolean setToLastCollection()
Set the iterator to the last element in the last collection in this federated collection. The last element is not a collection. Returns true if the operation is successful, otherwise it returns false.

setToNextCollection

public boolean setToNextCollection()
Set the iterator to the first element in the next collection in this federated collection. The first element is not a collection. Returns true if the operation is successful, otherwise it returns false.

setToPreviousCollection

public boolean setToPreviousCollection()
Set the iterator to the last element in the previous collection in this federated collection. The first last is not a collection. Returns true if the operation is successful, otherwise it returns false.

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.