| Modifier | Constructor and Description |
|---|---|
protected |
QueryFilter(QueryFilter left,
String operator,
QueryFilter right)
Internal constructor for joining multiple QueryFilter objects by an AND or OR.
|
|
QueryFilter(String field,
String operator,
String value)
Create a new query filter with the specified options.
|
| Modifier and Type | Method and Description |
|---|---|
static QueryFilter |
and(QueryFilter... queryFilters)
Get a query filter that is the ANDed combination of the specified filters.
|
QueryFilter |
and(QueryFilter q)
Get a query filter that is the ANDed combination of this filter and the specified one.
|
static QueryFilter |
or(QueryFilter... queryFilters)
Get a query filter that is the ORed combination of the specified filters.
|
QueryFilter |
or(QueryFilter q)
Get a query filter that is the ORed combination of this filter and the specified one.
|
String |
toString()
Get the string representation of this query filter.
|
public QueryFilter(String field, String operator, String value)
field - the object field to evaluateoperator - the operator to use for evaluationvalue - the value to be evaluatedprotected QueryFilter(QueryFilter left, String operator, QueryFilter right)
left - the left queryoperator - AND/ORright - the right querypublic QueryFilter and(QueryFilter q)
q - the filter to be ANDedpublic QueryFilter or(QueryFilter q)
q - the filter to be ORedpublic String toString()
Examples:
public static QueryFilter and(QueryFilter... queryFilters)
queryFilters - one or more query filters to be ANDed togetherpublic static QueryFilter or(QueryFilter... queryFilters)
queryFilters - one or more query filters to be ORed togetherCopyright © 2016. All Rights Reserved.