-
Notifications
You must be signed in to change notification settings - Fork 0
1.3.1 FilterParameter
Anders Mikkelsen edited this page Dec 18, 2017
·
2 revisions
You can filter on fields with the following parameters:
- eq (Equals)
- ne (Not Equals)
- gt (Greater Than)
- lt (Less Than)
- ge (Greater or Equal Than)
- le (Lesser or Equal Than)
- contains (Field contains value)
- notContains (Field does not contain value)
- beginsWith (Field begins with value (CASE SENSITIVE))
- in (Value exists in field)
- type (Boolean type (And / Or))
The FilterParameter class defines a filtering specification for a field. It is easily constructed like this:
FilterParameter.builder("someBoolean")
.withEq("true")
.build()
If you want to construct more complex combinations you can set the type of the specification as well. The default is AND. e.g:
someBoolean == true AND someOtherBoolean == false
This would set a filterparameter to OR, and OR on the next parameter in the list supplied to a QueryPack.
FilterParameter.builder("someBoolean")
.withEq("true")
.withType("or")
.build()