Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content.paging
Interface ISortablePagedList<T>

All Superinterfaces
  ContentListKeys, IPagedList<T>, Iterable<T>, Serializable

All Known Subinterfaces:
  ISortableFilterablePagedList<T>

    public interface ISortablePagedList<T>

extends IPagedList<T>

An IPagedList which can be sorted. This is an application of the com.bea.p13n.pagination.SortablePagedResult model to the IPagedList construct.

An overview of PagedList capabilities, including sorting and filtering, is provided in the package documentation at `com.bea.content.paging`

Supports single-property sorting with a sort order and sort locale, plus queries to find the set of properties which can be used.

For example, you can construct a sort such as: 'name' property value ascending

Sortable properties can either be 'native' or 'non-native'. Native sortable properties will perform best.

This interface is intended to be implemented only by BEA Weblogic Portal. BEA Systems reserves the right to add abstract methods to this interface without notice. Implementations of this interface by other parties must not be expected to compile without change in future versions of BEA Weblogic Portal.

Field Summary

Fields inherited from interface com.bea.content.paging.ContentListKeys
`ALL_ITEMS, BATCH_LOADING_SIZE_KEY, CUSTOM_OBJECT_FILTER, CUSTOM_OBJECT_SORT, FILTER_CRITERIA_KEY, SORT_CRITERIA_KEY`

Method Summary
`Set<String>` | `getAllSortableProperties()` Retrieve a list of all the possible properties which can be sorted on.
`Locale` | `getCurrentSortLocale()` Retrieve the current locale (if any) used to sort.
`SortOrder` | `getCurrentSortOrder()` Retrieve the current sort order (how the PagedList is currently ordered).
`String` | `getCurrentSortProperty()` Retrieve the property we are currently sorting on.
`Set<String>` | `getNativeSortableProperties()` Behaves the same as getAllSortableProperties(), except this method returns only high-performing (native) sort properties.
`void` | `reSort(SortOrder sortOrder, String sortByProperty, Locale sortLocale)` Re-sort the results.

Methods inherited from interface com.bea.content.paging.IPagedList
`fullSize, getBatchLoadingSize, isFullyResolved, iterator, nativeSize, setBatchLoadingSize`

Method Detail

### getAllSortableProperties

    Set<String> getAllSortableProperties()
                                         throws RepositoryRuntimeException

  Retrieve a list of all the possible properties which can be sorted on.

  Returns
    a set of Strings naming the sortable properties, one of which can be passed in the reSort() method as the sortProperty.

    Note: a special 'custom object sort' property as defined in ContentListKeys may be present in the returned values.

    May NOT be null. If no properties are sortable, this method returns an empty set.

  Throws
    `RepositoryRuntimeException`

### getNativeSortableProperties

    Set<String> getNativeSortableProperties()
                                            throws RepositoryRuntimeException

  Behaves the same as getAllSortableProperties(), except this method returns only high-performing (native) sort properties.

  Note: a special 'custom object sort' property as defined in ContentListKeys may be present in the returned values.

  Throws
    `RepositoryRuntimeException`

### getCurrentSortOrder

    SortOrder getCurrentSortOrder()
                                  throws RepositoryRuntimeException

  Retrieve the current sort order (how the PagedList is currently ordered).

  Throws
    `RepositoryRuntimeException`

### getCurrentSortProperty

    String getCurrentSortProperty()
                                  throws RepositoryRuntimeException

  Retrieve the property we are currently sorting on. Might return null if the sortOrder is UNSORTED. Otherwise, this property should be listed in getAllSortableProperties(), and should match one of the java bean properties of the type being sorted.

  Note: this method may return the special 'custom object sort' property as defined in ContentListKeys.

  Throws
    `RepositoryRuntimeException`

### getCurrentSortLocale

    Locale getCurrentSortLocale()
                                throws RepositoryRuntimeException

  Retrieve the current locale (if any) used to sort. Null means that Locale is not considered when sorting. Even if set, the implementation might ignore the locale for some sort properties (i.e. numbers, which sort the same in any locale).

  Throws
    `RepositoryRuntimeException`

### reSort

    void reSort(SortOrder sortOrder,
                String sortByProperty,
                Locale sortLocale)
                throws UnsupportedOperationException,
                       IllegalArgumentException,
                       RepositoryRuntimeException

  Re-sort the results. This should result in resetting the IPagedList's current position to "before the first item", since the results will be quite different. It should also reset the internal state of sortOrder, sortProperty, and sortLocale to that indicated by the reSort.

  Parameters
    `sortOrder` - the new order to use for sorting. Null is not allowed.
    `sortByProperty` - 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. This can include the special 'custom object sort' property defined in ContentListKeys.

    `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).
  Throws
    `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.
    `RepositoryRuntimeException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 BEA Systems, Inc. All Rights Reserved