|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.data.provider.FilterCriteria
public abstract class FilterCriteria
The FilterCriteria class defines a single filter criteria for a TableDataFilter. This includes a boolean to indicate an include
(true) or exclude (false) filter critiera.
An array of these FilterCriteria objects are used to define the display
filter for an TableDataProvider.
| Constructor Summary | |
|---|---|
FilterCriteria()
Constructs a new FilterCriteria object with no display name and the default state for include ( true). |
|
FilterCriteria(java.lang.String displayName)
Constructs a new FilterCriteria object with the specified display name and the default state for the include/exclude ( true ==
include). |
|
FilterCriteria(java.lang.String displayName,
boolean include)
Constructs a new FilterCriteria object with the specified display name and state for include/exclude ( true == include). |
|
| Method Summary | |
|---|---|
java.lang.String |
getDisplayName()
Returns the display name for this filter criteria. |
boolean |
isInclude()
Returns the include/exclude setting for this FilterCriteria. |
abstract boolean |
match(TableDataProvider provider,
RowKey rowKey)
Determines wether or not a particular row matches this filter criteria. |
void |
setDisplayName(java.lang.String displayName)
Sets the display name for this filter criteria. |
void |
setInclude(boolean include)
Sets the include/exclude setting for this filter criteria. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilterCriteria()
Constructs a new FilterCriteria object with no display name and the
default state for include (true).
public FilterCriteria(java.lang.String displayName)
Constructs a new FilterCriteria object with the specified display name
and the default state for the include/exclude (true ==
include).
displayName - The desired display name for this filter criteria
public FilterCriteria(java.lang.String displayName,
boolean include)
Constructs a new FilterCriteria object with the specified display name
and state for include/exclude (true == include).
displayName - The desired display name for this filter criteriainclude - true matches for this criteria, or
exclude false matches for this criteria.| Method Detail |
|---|
public void setDisplayName(java.lang.String displayName)
Sets the display name for this filter criteria.
displayName - The desired display name for this filter criteriapublic java.lang.String getDisplayName()
Returns the display name for this filter criteria.
public void setInclude(boolean include)
Sets the include/exclude setting for this filter criteria.
true represents include (include filter matches in the
row list), and false represents exclude (exclude filter
matches in the row list).
include - true matches for this criteria, or exclude
false matches for this criteria.public boolean isInclude()
Returns the include/exclude setting for this FilterCriteria.
true represents include (include filter matches in the
row list), and a false represents exclude (exclude
filter matches in the row list).
true represents include (include filter matches
in the row list), and a false represents exclude
(exclude filter matches in the row list).
public abstract boolean match(TableDataProvider provider,
RowKey rowKey)
throws DataProviderException
Determines wether or not a particular row matches this filter criteria. Implementations may perform whatever logic is desired to make this determination. The combination of a positive match and the state of the include property determines if a row is included or excluded from the filter.
provider - TableDataProvider containing the data on
displayrowKey - The RowKey of the data to be checked for a match
true if a match was detected, or
false if not.
DataProviderException - Implementations may wish to surface
internal exceptions (nested in DataProviderException) rather
than simply returning null. A DPE may also indicate that the
passed TableDataProvider or RowKey is not valid. Consult the
documentation of the specific FilterCriteria implementation for
details on what exceptions might be wrapped by a DPE.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||