|
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 SortablePagedResult<T>
A PagedResult which can be sorted. Sorting is done using property names and a SortOrder indicator.
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 sorting those results, the implementation should retrieve results, sorted by the database, a page (or a few pages) at a time, and return those via the PagedResults interface.
Field Summary |
---|
Fields inherited from interface com.bea.p13n.pagination.PagedResult |
---|
COUNT_UNKNOWN |
Method Summary | |
---|---|
Set<String> |
getSortableProperties() An implementation must report which of its properties can be legaly sorted. |
Locale |
getSortLocale() Retrieve the current locale used for sorting. |
SortOrder |
getSortOrder() Retrieve the current state of the sort order (what order the result is sorted by). |
String |
getSortProperty() Retrieve the current state of the property used to sort the result. |
void |
reSort(SortOrder sortOrder, String sortProperty, Locale sortLocale) Resort the results. |
Methods inherited from interface com.bea.p13n.pagination.PagedResult |
---|
close, getCurrentPageNumber, getPage, getPageCount, getPageSize, getTotalItemCount, hasNextPage, hasPage, hasPreviousPage, isCompleteResults, isGetPageSupported, nextPage, previousPage, resize |
Method Detail |
---|
SortOrder getSortOrder()
Set<String> getSortableProperties()
String getSortProperty()
Locale getSortLocale()
void reSort(SortOrder sortOrder, String sortProperty, Locale sortLocale) throws UnsupportedOperationException
Most implementations should not simply reorder the current data, but should rather reissue page queries to retrieve sorted results.
sortOrder
- the new order to use for sorting. Null is not allowed.sortProperty
- the property of the result to use for sorting. If sortOrder is UNSORTED, this property is probably ignored (and reSort is not actually required to do anything at all). Must not be null or empty, unless sortOrder is UNSORTED or the implementation chooses to ignore it. Otherwise this must be one of the properties reported by getSortableProperties.sortLocale
- locale used to sort. Null implies that sorting should not be based on Locale. Might be ignored if the bean or property being sorted does not support locale-based sorting (i.e. the property is an Integer).UnsupportedOperationException
- if the sort can not be performed on the given property.IllegalArgumentException
- if sortOrder is null, or if the sortProperty is null or empty string when sortOrder is something other than UNSORTED.
|
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.