Java Client API Reference 6.0.2.61

com.baan.b3.boi1
Interface Iterator


public interface Iterator

Points into a set of business objects.
This works much like a standard java.util.Enumeration. It is used to enable asynchronous data retrieval, whereby a client application can process a part of the result of a query while the next part is being retrieved

Version:
Build Nr 61, file version \\main\\4, 15:08:58 24-07-2006 UTC

Method Summary
 boolean hasMoreElements()
          Indicates whether there are more business objects to return
Threading policy: Unsafe
 BusinessObject nextElement()
          Returns the next business object.
 void setFetchSize(int p_iteratorSize)
          Sets the fetch size for this iterator.
 

Method Detail

hasMoreElements

public boolean hasMoreElements()
                        throws BoiException,
                               BoiApplicationException
Indicates whether there are more business objects to return
Threading policy: Unsafe
Returns:
true if a call to nextElement() will return another business object, false if such a call will result in a NoSuchElementException
Throws:
BoiException - if an adapter or transport level error occurred
BoiApplicationException - if the query resulted in an error in the backend

nextElement

public BusinessObject nextElement()
                           throws BoiException,
                                  BoiApplicationException,
                                  java.lang.ClassCastException,
                                  java.util.NoSuchElementException
Returns the next business object.
This method returns the next business object from the set that is being iterated through. This business object needs to be cast to the specific type-safe wrapper expected
Preconditions: The hasMoreElements() method returns true
Postconditions: A subsequent call to this method will return the business object in the data set after the one just returned (if there are any left)
Threading policy: Unsafe
Returns:
the next business object (shall not be null)
Throws:
BoiException - if an error occurred at the adapter or transport level
BoiApplicationException - if an error occurred while processing the query in the backend
java.util.NoSuchElementException - if the end of the data set has been reached
java.lang.ClassCastException - if there is a type mismatch between the expected type of object and the type of the returned objects

setFetchSize

public void setFetchSize(int p_iteratorSize)
Sets the fetch size for this iterator.
The Iterator retrieves all it's data in sets, and the size of these sets is configurable. This can be set using the adapter configuration tools, but the size of the set can also be set at runtime with this method. Note that retrieving the data in sets is done for performance reasons. The optimal fetch size depends on the size of one record (and number of sub records), the transport speed, and the time the OpenWorldX Adapter backend needs to produce the data.
Postconditions: The next fetch from the backend will use the new size
Threading policy: Unsafe
Parameters:
p_iteratorSize - the number of 'root' business objects to retrieve with each fetch (must be greater than 0)

Java Client API Reference 6.0.2.61

Visit the SSA Global website for more information.