|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FilterablePagedResult<T>
A PagedResult which can be filtered. Filter is like "lite" search, but is used to restrict a returned set of PagedResults to some subset.
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 filtering (subsetting) those results, the implementation should retrieve results, filtered by the database, a page (or a few pages) at a time, and return those via the PagedResults interface.
The filter criteria is described by a FilterMethod and a string, which matches a named property of the result (T).
Field Summary |
---|
Fields inherited from interface com.bea.p13n.pagination.PagedResult |
---|
COUNT_UNKNOWN |
Method Summary | |
---|---|
Set<String> |
getFilterableProperties()
An implementation must report which of its properties can be legaly filtered. |
Locale |
getFilterLocale()
Retrieve the current locale used for filtering. |
FilterMethod |
getFilterMethod()
Retrieve the current state of the filter method (what way the result is currently filtered). |
String |
getFilterProperty()
Retrieve the current state of the property used to filter the result. |
String |
getFilterString()
Retrieve the current state of the string used to filter the result. |
Set<FilterMethod> |
getSupportedFilterMethods()
An implementation must report which FilterMethods it supports. |
void |
reFilter(FilterMethod filterMethod,
String filterString,
String filterProperty,
Locale filterLocale)
Refilter 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 |
---|
Set<FilterMethod> getSupportedFilterMethods()
Set<String> getFilterableProperties()
FilterMethod getFilterMethod()
String getFilterString()
String getFilterProperty()
Locale getFilterLocale()
void reFilter(FilterMethod filterMethod, String filterString, String filterProperty, Locale filterLocale) throws UnsupportedOperationException, IllegalArgumentException
filterMethod
- the new method to use for filtering. Null is not allowed.filterString
- the string to use for filtering.
If filterMethod is UNFILTERED, this is probably ignored,
but reFilter should then reissue the query to return a full unfiltered set
of results. May not be null or empty, unlesss filterMethod is UNFILTERED.filterProperty
- the property of the result to use for filtering.
If filterMethod is UNFILTERED, this property is probably ignored (and
reFilter simply resets to the full result set). Must not be null or empty,
unless filterMethod is UNFILTERED or the implementation chooses to ignore it.
Oherwise this should match one of the names returned by getFilterableProperties.filterLocale
- locale used to filter. Null implies that filtering should not
be based on Locale. Might be ignored if the bean or property being filtered
does not support locale-based filtering (i.e. the property is an Integer or
has no associated localized content).
UnsupportedOperationException
- if filtering can not be performed for
the given property or method.
IllegalArgumentException
- if filterMethod is null, or if the filterExpression
or filterPropery are null or empty string when filterMethod is anything
other than UNFILTERED.
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |