public class Criteria
extends java.lang.Object
implements CriteriaDefinition
限定符 | 构造器和说明 |
---|---|
|
Criteria() |
protected |
Criteria(java.util.List |
|
Criteria(java.lang.String key) |
限定符和类型 | 方法和说明 |
---|---|
Criteria |
all(java.util.Collection> o) |
Criteria |
all(java.lang.Object... o)
Creates a criterion using the $all operator
|
Criteria |
and(java.lang.String key)
Static factory method to create a Criteria using the provided key
|
Criteria |
andOperator(Criteria... criteria)
Creates an 'and' criteria using the $and operator for all of the provided criteria
|
Criteria |
elemMatch(Criteria c)
Creates a criterion using the $elemMatch operator
|
boolean |
equals(java.lang.Object obj) |
Criteria |
exists(boolean b)
Creates a criterion using the $exists operator
|
DBObject |
getCriteriaObject() |
java.lang.String |
getKey() |
protected DBObject |
getSingleCriteriaObject() |
Criteria |
gt(java.lang.Object o)
Creates a criterion using the $gt operator
|
Criteria |
gte(java.lang.Object o)
Creates a criterion using the $gte operator
|
int |
hashCode() |
Criteria |
in(java.util.Collection> c)
Creates a criterion using the $in operator
|
Criteria |
in(java.lang.Object... o)
Creates a criterion using the $in operator
|
Criteria |
is(java.lang.Object o)
Creates a criterion using equality
|
Criteria |
lt(java.lang.Object o)
Creates a criterion using the $lt operator
|
Criteria |
lte(java.lang.Object o)
Creates a criterion using the $lte operator
|
Criteria |
maxDistance(double maxDistance)
Creates a geospatical criterion using a $maxDistance operation, for use with $near
|
Criteria |
mod(java.lang.Number value, java.lang.Number remainder)
Creates a criterion using the $mod operator
|
Criteria |
ne(java.lang.Object o)
Creates a criterion using the $ne operator
|
Criteria |
near(Point point)
Creates a geospatial criterion using a $near operation
|
Criteria |
nearSphere(Point point)
Creates a geospatial criterion using a $nearSphere operation.
|
Criteria |
nin(java.util.Collection> o) |
Criteria |
nin(java.lang.Object... o)
Creates a criterion using the $nin operator
|
Criteria |
norOperator(Criteria... criteria)
Creates a 'nor' criteria using the $nor operator for all of the provided criteria
|
Criteria |
not()
Creates a criterion using the $not meta operator which affects the clause directly following
|
Criteria |
orOperator(Criteria... criteria)
Creates an 'or' criteria using the $or operator for all of the provided criteria
|
Criteria |
regex(java.util.regex.Pattern pattern)
Syntactical sugar for
is(Object) making obvious that we create a regex predicate.
|
Criteria |
regex(java.lang.String re)
Creates a criterion using a $regex
|
Criteria |
regex(java.lang.String re, java.lang.String options)
Creates a criterion using a $regex and $options
|
Criteria |
size(int s)
Creates a criterion using the $size operator
|
Criteria |
type(int t)
Creates a criterion using the $type operator
|
static Criteria |
where(java.lang.String key)
Static factory method to create a Criteria using the provided key
|
Criteria |
within(Shape shape) |
Criteria |
withinSphere(Circle circle)
Creates a geospatial criterion using a $within $center operation.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
public Criteria()
public Criteria(java.lang.String key)
protected Criteria(java.util.ListcriteriaChain, java.lang.String key)
public static Criteria where(java.lang.String key)
key
-
public Criteria and(java.lang.String key)
public Criteria is(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 in(java.lang.Object... o)
o
- the values to match against
public Criteria in(java.util.Collection> c)
c
- the collection containing the values to match against
public Criteria nin(java.lang.Object... o)
o
-
public Criteria nin(java.util.Collection> o)
public Criteria mod(java.lang.Number value, java.lang.Number remainder)
value
-
remainder
-
public Criteria all(java.lang.Object... o)
o
-
public Criteria all(java.util.Collection> o)
public Criteria size(int s)
s
-
public Criteria exists(boolean b)
b
-
public Criteria type(int t)
t
-
public Criteria not()
public Criteria regex(java.lang.String re)
re
-
public Criteria regex(java.lang.String re, java.lang.String options)
re
-
options
-
public Criteria regex(java.util.regex.Pattern pattern)
is(Object)
making obvious that we create a regex predicate.
pattern
-
public Criteria withinSphere(Circle circle)
circle
- must not be null
public Criteria within(Shape shape)
public Criteria near(Point point)
point
- must not be null
public Criteria nearSphere(Point point)
point
- must not be null
public Criteria maxDistance(double maxDistance)
maxDistance
-
public Criteria elemMatch(Criteria c)
c
-
public Criteria orOperator(Criteria... criteria)
criteria
-
public Criteria norOperator(Criteria... criteria)
criteria
-
public Criteria andOperator(Criteria... criteria)
criteria
-
public java.lang.String getKey()
public DBObject getCriteriaObject()
getCriteriaObject
在接口中
CriteriaDefinition
protected DBObject getSingleCriteriaObject()
public boolean equals(java.lang.Object obj)
equals
在类中
java.lang.Object
public int hashCode()
hashCode
在类中
java.lang.Object