com.sun.mdm.index.ejb.page
Interface PageData

All Known Subinterfaces:
PageDataRemote
All Known Implementing Classes:
PageDataEJB

public interface PageData

Interface for PageDataEJB


Method Summary
 int count()
          Return total number of records in set.
 java.util.ArrayList next(int count)
          Get the next "count" number of records.
 java.util.ArrayList next(int index, int count)
          Same as next(count) however position is changed to index first.
 java.util.ArrayList prev(int count)
          Get the previous "count" number of records.
 java.util.ArrayList prev(int index, int count)
          Same as prev(count) however position is changed to index first.
 void remove()
          remove the PageAdaptor
 void setPageAdapter(PageAdapter pageAdapter)
          Set the PageAdaptor for data source
 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 sort(java.util.Comparator c)
          Sort the set based on the comparator.
 void sortSummary(java.util.Comparator c)
          Sort the set based on the comparator.
 

Method Detail

count

public int count()
          throws PageException
Return total number of records in set.

Returns:
Number of records in data source.
Throws:
PageException - An error has occured.

next

public java.util.ArrayList next(int count)
                         throws PageException
Get the next "count" number of records. For example, if current row position is 3, and count is 5, return rows 4,5,6,7,8 and place row position at 8. If less than "count" number of records left, return all records to end of set, and place row position atend of set. If no records are left, return null and leave row position as is.

Parameters:
count - Number of records to get
Returns:
List of records
Throws:
PageException - An error has occured.

next

public java.util.ArrayList next(int index,
                                int count)
                         throws PageException
Same as next(count) however position is changed to index first.

Parameters:
index - Starting point of retrieval.
count - Number of records to get
Returns:
List of records
Throws:
PageException - An error has occured.

prev

public java.util.ArrayList prev(int count)
                         throws PageException
Get the previous "count" number of records. For example, if current row position is 8, and count is 5, return rows 7,6,5,4,3 and place row position at 3. If less than "count" number of records left, return all records to beginning of set, and set row position to 0. If no records are left, return null and leave row position at 0.

Parameters:
count - Number of records to get
Returns:
List of records
Throws:
PageException - An error has occured.

prev

public java.util.ArrayList prev(int index,
                                int count)
                         throws PageException
Same as prev(count) however position is changed to index first.

Parameters:
index - Starting point of retrieval.
count - Number of records to get
Returns:
List of records
Throws:
PageException - An error has occured.

remove

public void remove()
remove the PageAdaptor


setPageAdapter

public void setPageAdapter(PageAdapter pageAdapter)
                    throws PageException
Set the PageAdaptor for data source

Parameters:
pageAdapter - PageAdaptor for data source
Throws:
PageException - An error has occured.

setReadForwardOnly

public void setReadForwardOnly(boolean forwardOnly)
                        throws PageException
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.

Parameters:
forwardOnly - the forward only flag
Throws:
PageException - An error has occured.

sort

public void sort(java.util.Comparator c)
          throws PageException
Sort the set based on the comparator.

Parameters:
c - Comparator by which to sort.
Throws:
PageException - An error has occured.

sortSummary

public void sortSummary(java.util.Comparator c)
                 throws PageException
Sort the set based on the comparator.

Parameters:
c - Comparator by which to sort.
Throws:
PageException - An error has occured.


Sun Microsystems, Inc.