|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PagedResult<T>
Result of some query, organized as pages. Each page consists of some number (usually page size) of beans (T), and is accessed via an Iterator<T>.
It is generally expected that most implementations will be backed by something like database queries, and should be optimized for paganated access. That is, rather than retrieving a full set of results into memory and breaking that into pages, the implementation should retrieve results a page (or a few pages) at a time, and return those via this interface.
The objects contained on the pages should be Java Beans or Strings, since sorting and filtering of these objects is done based on bean properties.
A PagedResult must be Serializable so that it can be stored, for example, in the HttpSession for use across several requests.
SortablePagedResult
, FilterablePagedResult
, SortableFilterablePagedResult
Field Summary | |
---|---|
static int |
COUNT_UNKNOWN Represents an unknown count. |
Method Summary | |
---|---|
void |
close() Close the result and release any resources which it holds. |
int |
getCurrentPageNumber() Get the current page number. |
Iterator<T> |
getPage(int pageNumber) Get the specified page. |
int |
getPageCount() How many pages are available. |
int |
getPageSize() Get the size of the pages. |
int |
getTotalItemCount() Get the total number of items represented by these pages. |
boolean |
hasNextPage() Is there a next page? Will a call to nextPage() succeed? |
boolean |
hasPage(int pageNumber) Does the given page exist? Should a call to getPage( pageNumber ) succeed? Generally, this means that getPageNumber() < getPageCount(), but some iterators may not allow random access to all pages, in which case this might return false even when you could get to that page using next/previous. |
boolean |
hasPreviousPage() Is there a previous page? Will a call to previousPage() succeed? |
boolean |
isCompleteResults() Does this result represent a complete set of results? If not, then probably the maximum number of query results was reached and this iterator only represents a subset of the actual query. |
boolean |
isGetPageSupported() Does this iterator allow random access to pages? This method (vs. |
Iterator<T> |
nextPage() Get an iterator of the next page full of things. |
Iterator<T> |
previousPage() Get an iterator of the previous page full of things. |
void |
resize(int pageSize) Set a new page size. |
Field Detail |
---|
static final int COUNT_UNKNOWN
getTotalItemCount()
, getPageCount()
, Constants SummaryMethod Detail |
---|
int getPageSize()
int getTotalItemCount()
int getPageCount()
boolean isCompleteResults()
int getCurrentPageNumber()
boolean hasNextPage()
Iterator<T> nextPage() throws NoSuchElementException
NoSuchElementException
- if there is no next page.boolean hasPreviousPage()
Iterator<T> previousPage() throws NoSuchElementException
NoSuchElementException
- if there is no previous page.boolean isGetPageSupported()
boolean hasPage(int pageNumber)
Iterator<T> getPage(int pageNumber) throws IndexOutOfBoundsException, UnsupportedOperationException
IndexOutOfBoundsException
- if the pageNumber is negative or is after the last page.UnsupportedOperationException
- if this PageIterator does not support random access of pages (or of that page).void close()
void resize(int pageSize) throws IllegalArgumentException
IllegalArgumentException
- if pageSize is less than or equal to zero
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.