public static class LiveDataQuery.Filter extends Object
Constructor and Description |
---|
Filter()
Default constructor.
|
Filter(String property,
boolean matchAll,
Object... values)
Creates a new filter for the specified property, using the given values.
|
Filter(String property,
Object value)
Creates a new filter for the specified property, using the given value.
|
Filter(String property,
String operator,
boolean matchAll,
Object... values)
Creates a new filter for the specified property, using the given values.
|
Filter(String property,
String operator,
Object value)
Creates a new filter for the specified property, using the given value.
|
Modifier and Type | Method and Description |
---|---|
List<LiveDataQuery.Constraint> |
getConstraints() |
String |
getProperty() |
boolean |
isMatchAll() |
void |
setMatchAll(boolean matchAll)
Sets whether the property value needs to match all the constraints or any.
|
void |
setProperty(String property)
Sets the property to filter.
|
public Filter()
public Filter(String property, Object value)
property
- the property to filter onvalue
- the value to match, using the default operator for the specified propertypublic Filter(String property, String operator, Object value)
property
- the property to filter onoperator
- the operator to use to match the given value (e.g. 'equals', 'contains', 'startsWith')value
- the value to match, using the specified operatorpublic Filter(String property, boolean matchAll, Object... values)
property
- the property to filter onmatchAll
- whether to match all the given values or any of themvalues
- the values to match, using the default operator for the specified propertypublic Filter(String property, String operator, boolean matchAll, Object... values)
property
- the property to filter onoperator
- the operator to use to match the given values (e.g. 'equals', 'contains', 'startsWith')matchAll
- whether to match all the given values or any of themvalues
- the values to match, using the specified operatorpublic String getProperty()
public void setProperty(String property)
property
- the property to filterpublic boolean isMatchAll()
true
if all the getConstraints()
have to be met, false
if any of them need
to be satisfiedpublic void setMatchAll(boolean matchAll)
matchAll
- true
to match all constraints, false
to match any of thempublic List<LiveDataQuery.Constraint> getConstraints()
Copyright © 2004–2022 XWiki. All rights reserved.