public interface RMPageIterator<T>
Modifier and Type | Method and Description |
---|---|
java.util.List<T> |
getCurrentPage()
Returns the contents of the iterator's current page.
|
int |
getElementCount()
Indicates the number of elements in the current page.
|
RMPageMark |
getPageMark()
Returns a
PageMark instance representing the iterator's
current continuation state. |
int |
getPageSize()
Indicates the current maximum page size defined for the
RMPageIterator . |
boolean |
nextPage()
Moves the iterator to the next page of the collection.
|
void |
reset()
Positions the page iterator to a point just before the first
page of results.
|
void |
reset(RMPageMark mark)
Resets the page iterator back to the specified set of results as defined by
a
RMPageMark instance. |
void |
setPageSize(int pageSize)
Defines the maximum number of elements for
any subsequent
getCurrentPage() method calls. |
void setPageSize(int pageSize)
getCurrentPage()
method calls.
The page size value established through this method
does NOT apply to the first page resulting from the
first call to getCurrentPage()
. The page size used
for the initial getCurrentPage()
call is defined
by how the collection was originally retrieved (for example,
by a "fetch" or "search" mechanism).pageSize
- An int
value greater than 0.int getPageSize()
RMPageIterator
.int
value.boolean nextPage()
true
until the iterator reaches the end of the collection.
false
for the first call of an empty collection.RAL_PAGE_ITERATOR_NEXT_PAGE_ERR
- for any unexpected error attempting to move to the next page.int getElementCount()
int
value.RAL_PAGE_ITERATOR_ELEMENT_COUNT_ERR
- for any unexpected error retrieving the current page count.java.util.List<T> getCurrentPage()
List
collection of the parameterized type.RAL_PAGE_ITERATOR_CURRENT_PAGE_ERR
- for any unexpected error retrieving the current page.RMPageMark getPageMark()
PageMark
instance representing the iterator's
current continuation state. This parameter can be used in a subsequent reset(RMPageMark)
method call.RMPageMark
instance.RAL_PAGE_ITERATOR_PAGE_MARK_ERROR
- for any unexpected error determining the current page mark location.void reset(RMPageMark mark)
RMPageMark
instance. This reset
method positions the iterator
before the marked page, the getCurrentPage()
method must be called to position
the iterator to the marked page.mark
- A RMPageMark
instance.void reset()
nextPage()
to initially position the
iterator to the first page.© Copyright IBM Corp. 2010, 2013. All Rights Reserved.