Predicate.PredicateContext| Modifier and Type | Method and Description |
|---|---|
Criteria |
all(java.util.Collection<?> c)
The
all operator is similar to $in, but instead of matching any value
in the specified array all values in the array must be matched. |
Criteria |
all(java.lang.Object... o)
The
all operator is similar to $in, but instead of matching any value
in the specified array all values in the array must be matched. |
Criteria |
and(java.lang.String key)
Static factory method to create a Criteria using the provided key
|
boolean |
apply(Predicate.PredicateContext ctx) |
static Criteria |
create(java.lang.String left,
java.lang.String operator,
java.lang.String right)
Creates a new criteria
|
Criteria |
eq(java.lang.Object o)
Creates a criterion using equality
|
Criteria |
exists(boolean b)
Check for existence (or lack thereof) of a field.
|
Criteria |
gt(java.lang.Object o)
Creates a criterion using the > operator
|
Criteria |
gte(java.lang.Object o)
Creates a criterion using the >= operator
|
Criteria |
in(java.util.Collection<?> c)
The
in operator is analogous to the SQL IN modifier, allowing you
to specify an array of possible matches. |
Criteria |
in(java.lang.Object... o)
The
in operator is analogous to the SQL IN modifier, allowing you
to specify an array of possible matches. |
Criteria |
is(java.lang.Object o)
Creates a criterion using equality
|
Criteria |
lt(java.lang.Object o)
Creates a criterion using the < operator
|
Criteria |
lte(java.lang.Object o)
Creates a criterion using the <= operator
|
Criteria |
matches(Predicate p)
The
matches operator checks that an object matches the given predicate. |
Criteria |
ne(java.lang.Object o)
Creates a criterion using the != operator
|
Criteria |
nin(java.util.Collection<?> c)
The
nin operator is similar to $in except that it selects objects for
which the specified field does not have any value in the specified array. |
Criteria |
nin(java.lang.Object... o)
The
nin operator is similar to $in except that it selects objects for
which the specified field does not have any value in the specified array. |
Criteria |
notEmpty()
The
notEmpty operator checks that an array or String is not empty. |
static Criteria |
parse(java.lang.String criteria)
Parse the provided criteria
|
Criteria |
regex(java.util.regex.Pattern pattern)
Creates a criterion using a Regex
|
Criteria |
size(int size)
The
size operator matches:
array with the specified number of elements.
string with given length.
|
java.lang.String |
toString() |
Criteria |
type(java.lang.Class<?> t)
The $type operator matches values based on their Java type.
|
static Criteria |
where(Path key)
Static factory method to create a Criteria using the provided key
|
static Criteria |
where(java.lang.String key)
Static factory method to create a Criteria using the provided key
|
public boolean apply(Predicate.PredicateContext ctx)
public static Criteria where(Path key)
key - filed namepublic static Criteria where(java.lang.String key)
key - filed namepublic Criteria and(java.lang.String key)
key - ads new filed to criteriapublic Criteria is(java.lang.Object o)
o - public Criteria eq(java.lang.Object o)
o - public Criteria ne(java.lang.Object o)
o - public Criteria lt(java.lang.Object o)
o - public Criteria lte(java.lang.Object o)
o - public Criteria gt(java.lang.Object o)
o - public Criteria gte(java.lang.Object o)
o - public Criteria regex(java.util.regex.Pattern pattern)
pattern - public Criteria in(java.lang.Object... o)
in operator is analogous to the SQL IN modifier, allowing you
to specify an array of possible matches.o - the values to match againstpublic Criteria in(java.util.Collection<?> c)
in operator is analogous to the SQL IN modifier, allowing you
to specify an array of possible matches.c - the collection containing the values to match againstpublic Criteria nin(java.lang.Object... o)
nin operator is similar to $in except that it selects objects for
which the specified field does not have any value in the specified array.o - the values to match againstpublic Criteria nin(java.util.Collection<?> c)
nin operator is similar to $in except that it selects objects for
which the specified field does not have any value in the specified array.c - the values to match againstpublic Criteria all(java.lang.Object... o)
all operator is similar to $in, but instead of matching any value
in the specified array all values in the array must be matched.o - public Criteria all(java.util.Collection<?> c)
all operator is similar to $in, but instead of matching any value
in the specified array all values in the array must be matched.c - public Criteria size(int size)
size operator matches:
size - public Criteria exists(boolean b)
b - public Criteria type(java.lang.Class<?> t)
t - public Criteria notEmpty()
notEmpty operator checks that an array or String is not empty.public Criteria matches(Predicate p)
matches operator checks that an object matches the given predicate.p - public static Criteria parse(java.lang.String criteria)
criteria - public static Criteria create(java.lang.String left, java.lang.String operator, java.lang.String right)
left - path to evaluate in criteriaoperator - operatorright - expected valuepublic java.lang.String toString()
toString in class java.lang.Object