Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-03

oracle.toplink.ejb.cmp
Interface CursoredIterator

All Superinterfaces:
java.util.Iterator, java.io.Serializable
All Known Subinterfaces:
CursoredIterator

public interface CursoredIterator
extends java.io.Serializable, java.util.Iterator

CursoredIterator provides an interface that conforms to Iterator while providing Cursor behaviour. This interface is returned from an EJB finder method that uses TopLink CursoredStream support. This is TopLink's way of providing cursored support to EJB2.0 finders. Supported methods: close() hasNext() next() next(int) Example: Execute a finder that reads 150 projects. Read the first 50 as singles, then, read the next 50 in bulk. This simulates a screen paging down.

See Also:
CursoredStream, CursoredCollection

Method Summary
 void close()
           Close the underlying cursor.
 java.util.Collection next(int numberOfElements)
           Return the next numberOfElements elements in the underlying cursor.
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

close

void close()

Close the underlying cursor. This should be invoked when the user is finished using the cursor.


next

java.util.Collection next(int numberOfElements)

Return the next numberOfElements elements in the underlying cursor.

Parameters:
numberOfElements - the number of objects to consume from the result set
Returns:
Collection The Collection(Vector) of objects that were consumed from the result set

Copyright © 1998, 2010, Oracle. All Rights Reserved.