|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.data.provider.FilterCriteria com.sun.data.provider.impl.NestedFilterCriteria
The NestedFilterCriteria class defines a set of nested filter criteria
for a TableDataFilter
.
Field Summary | |
protected FilterCriteria[] |
filterCriteria
storage for the nested filter criteria |
protected boolean |
matchAll
storage for the matchAllCriteria property (default is true ) |
Constructor Summary | |
NestedFilterCriteria()
|
|
NestedFilterCriteria(java.lang.String displayName)
|
|
NestedFilterCriteria(java.lang.String displayName,
boolean include)
|
|
NestedFilterCriteria(java.lang.String displayName,
boolean include,
FilterCriteria[] nested)
|
Method Summary | |
FilterCriteria[] |
getFilterCriteria()
|
boolean |
isMatchAllCriteria()
Gets the matchAllCriteria property. |
boolean |
match(TableDataProvider provider,
RowKey row)
This method iterates the nested FilterCriteria and invokes the
match() method on each. |
void |
setFilterCriteria(FilterCriteria[] filterCriteria)
|
void |
setMatchAllCriteria(boolean matchAll)
Sets the matchAllCriteria property. |
Methods inherited from class com.sun.data.provider.FilterCriteria |
getDisplayName, isInclude, setDisplayName, setInclude |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected FilterCriteria[] filterCriteria
protected boolean matchAll
true
)
Constructor Detail |
public NestedFilterCriteria()
public NestedFilterCriteria(java.lang.String displayName)
displayName
- The desired display name for this nested filter criteriapublic NestedFilterCriteria(java.lang.String displayName, boolean include)
displayName
- The desired display name for this filter criteriainclude
- true
matches for this criteria, or
exclude false
matches for this criteria.public NestedFilterCriteria(java.lang.String displayName, boolean include, FilterCriteria[] nested)
displayName
- The desired display name for this filter criteriainclude
- true
matches for this criteria, or
exclude false
matches for this criteria.nested
- An array of nested filter criteriaMethod Detail |
public void setFilterCriteria(FilterCriteria[] filterCriteria)
filterCriteria
- FilterCriteria[]public FilterCriteria[] getFilterCriteria()
public void setMatchAllCriteria(boolean matchAll)
Sets the matchAllCriteria property. When set to true
,
the match(...)
method will only match rows that are
matched by all nested include filter criteria and not mached by all
nested exclude filter criteria. When set to false
, the
match(...)
method will match a row if it is matched
by any nested include filter criteria or not matched by any nested
exclude filter criteria.
matchAll
- The desired setting for the matchAllCriteria propertypublic boolean isMatchAllCriteria()
Gets the matchAllCriteria property. When set to true
,
the match(...)
method will only match rows that are
matched by all nested include filter criteria and not mached by all
nested exclude filter criteria. When set to false
, the
match(...)
method will match a row if it is matched
by any nested include filter criteria or not matched by any nested
exclude filter criteria.
public boolean match(TableDataProvider provider, RowKey row) throws DataProviderException
This method iterates the nested
FilterCriteria
and invokes the
match()
method on each. If the
matchAllCriteria
property is set to true
, then
all of the nested include filter criteria must match a row, and all of
the nested exclude filter criteria must not match a row for this method
to return true
. If the matchAllCriteria
property is set to false
(match any), then any nested
include criteria that matches a row or nested exclude criteria that does
not match a row will cause this method to return true
. If
there is no nested filter criteria defined, then this method returns
true
.
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.
match
in class FilterCriteria
provider
- TableDataProvider
containing the data on
displayrow
- 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 |