|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.mdm.index.page.PageIterator
Used by paging mechanism to efficiently transport data to caller in pages.
Constructor Summary | |
PageIterator(java.util.List fullData)
Constructor where data is passed to client directly |
|
PageIterator(java.lang.Object[] fullData)
Constructor where data is passed to client directly |
|
PageIterator(PageData pageData,
int pageSize,
int maxElements)
Constructor where data is stored on the server |
Method Summary | |
java.lang.Object |
absolute(int index)
Returns the element at the specified index. |
java.util.ArrayList |
absolute(int index,
int count)
Returns the next 'count' elements beginning with the element at the specified index. |
void |
close()
Free the server side resources. |
int |
count()
Returns the number of records in the iterator. |
int |
currentPosition()
Returns the current position of the iterator. |
java.lang.Object |
first()
Get the first record in the iterator. |
java.util.ArrayList |
first(int count)
Get the first 'count' records in the iterator or however many records are left if 'count' is greater than the size of the iterator. |
boolean |
hasNext()
Returns true if there are more records left in the iterator. |
java.lang.Object |
next()
Returns next element. |
java.util.ArrayList |
next(int count)
Get next 'count' number of elements. |
java.lang.Object |
prev()
Get previous element. |
java.util.ArrayList |
prev(int count)
Get 'count' previous elements. |
void |
setReadForwardOnly(boolean forwardOnly)
Set the forward only mode that will clear all the DataPage objects of of a given loaded page i when we start reading/loading the next page i+1. |
void |
sortBy(java.util.Comparator c)
Sort the objects based on the comparator |
void |
sortSummaryBy(java.util.Comparator c)
Sort the objects based on the comparator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PageIterator(java.util.List fullData)
fullData
- list of all objectspublic PageIterator(java.lang.Object[] fullData)
fullData
- array of all objects of result setpublic PageIterator(PageData pageData, int pageSize, int maxElements)
pageData
- session bean storing datapageSize
- unit size of data retrieval from servermaxElements
- maximum elements that will be retrievedMethod Detail |
public java.lang.Object absolute(int index) throws PageException, java.rmi.RemoteException
index
- row to retrieve
PageException
- An error occured.
java.rmi.RemoteException
- An error occured.public java.util.ArrayList absolute(int index, int count) throws PageException, java.rmi.RemoteException
index
- Row to retrieve.count
- Number of elements to retrieve.
PageException
- An error occured.
java.rmi.RemoteException
- An error occured.public void close() throws java.rmi.RemoteException
java.rmi.RemoteException
- An error occured.public int count() throws PageException, java.rmi.RemoteException
PageException
- An error occured.
java.rmi.RemoteException
- An error occured.public int currentPosition()
public java.lang.Object first() throws PageException, java.rmi.RemoteException
PageException
- An error occured.
java.rmi.RemoteException
- An error occured.public java.util.ArrayList first(int count) throws PageException, java.rmi.RemoteException
count
- Number of records to retrieve
PageException
- An error occured.
java.rmi.RemoteException
- An error occured.public boolean hasNext() throws java.rmi.RemoteException, PageException
java.rmi.RemoteException
- An error occured.
PageException
- An error occured.public java.lang.Object next() throws java.rmi.RemoteException, PageException
java.rmi.RemoteException
- An error occured.
PageException
- An error occured.public java.util.ArrayList next(int count) throws java.rmi.RemoteException, PageException
count
- Number of objects to retrieve
java.rmi.RemoteException
- An error occured.
PageException
- An error occured.public java.lang.Object prev() throws PageException, java.rmi.RemoteException
PageException
- An error occured.
java.rmi.RemoteException
- An error occured.public java.util.ArrayList prev(int count) throws PageException, java.rmi.RemoteException
count
- Number of objects to retrieve
PageException
- An error occured.
java.rmi.RemoteException
- An error occured.public void setReadForwardOnly(boolean forwardOnly)
forwardOnly
- thepublic void sortBy(java.util.Comparator c) throws java.rmi.RemoteException, PageException
c
- Comparator to sort by
PageException
- An error occured.
java.rmi.RemoteException
- An error occured.public void sortSummaryBy(java.util.Comparator c) throws java.rmi.RemoteException, PageException
c
- Comparator to sort by
PageException
- An error occured.
java.rmi.RemoteException
- An error occured.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun Microsystems, Inc.