java.lang.Object | |
↳ | com.mongodb.QueryBuilder |
Utility for creating DBObject queries
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a builder with an empty query
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Equivalent of the $all operand
| |||||||||||
Equivalent to an $and operand
| |||||||||||
Equivalent to
QueryBuilder.put(key) . | |||||||||||
Equivalent of the $exists operand
| |||||||||||
Creates a
DBObject query to be used for the driver's find operations | |||||||||||
Equivalent to the $gt operator
| |||||||||||
Equivalent to the $gte operator
| |||||||||||
Equivalent of the $in operand
| |||||||||||
Equivalent of the find({key:value})
| |||||||||||
Equivalent to the $lt operand
| |||||||||||
Equivalent to the $lte operand
| |||||||||||
Equivalent of the $mod operand
| |||||||||||
Equivalent of the $near operand
| |||||||||||
Equivalent of the $near operand
| |||||||||||
Equivalent of the $nearSphere operand
| |||||||||||
Equivalent of the $nearSphere operand
| |||||||||||
Equivalent of the $ne operand
| |||||||||||
Equivalent of the $nin operand
| |||||||||||
Equivalent to a $or operand
| |||||||||||
Adds a new key to the query if not present yet.
| |||||||||||
Passes a regular expression for a query
| |||||||||||
Equivalent of the $size operand
| |||||||||||
Creates a new query with a document key
| |||||||||||
returns a new QueryBuilder
| |||||||||||
Equivalent to a $within operand, based on a bounding box using represented by two corners
| |||||||||||
Equivalent of the $within operand, used for geospatial operation
| |||||||||||
Equivalent of the $centerSphere operand
mostly intended for queries up to a few hundred miles or km.
| |||||||||||
Equivalent to a $within operand, based on a bounding polygon represented by an array of points
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates a builder with an empty query
Equivalent of the $all operand
object | Value to query |
---|
Equivalent to QueryBuilder.put(key)
. Intended for compound query chains to be more readable
Example: QueryBuilder.start("a").greaterThan(1).and("b").lessThan(3)
key | MongoDB document key |
---|
Equivalent of the $exists operand
object | Value to query |
---|
Creates a DBObject
query to be used for the driver's find operations
RuntimeException | if a key does not have a matching operand |
---|
Equivalent to the $gt operator
object | Value to query |
---|
Equivalent to the $gte operator
object | Value to query |
---|
Equivalent of the $in operand
object | Value to query |
---|
Equivalent of the find({key:value})
object | Value to query |
---|
Equivalent to the $lt operand
object | Value to query |
---|
Equivalent to the $lte operand
object | Value to query |
---|
Equivalent of the $mod operand
object | Value to query |
---|
Equivalent of the $near operand
x | x coordinate |
---|---|
y | y coordinate |
maxDistance | max distance |
Equivalent of the $near operand
x | x coordinate |
---|---|
y | y coordinate |
Equivalent of the $nearSphere operand
longitude | coordinate in decimal degrees |
---|---|
latitude | coordinate in decimal degrees |
maxDistance | max spherical distance |
Equivalent of the $nearSphere operand
longitude | coordinate in decimal degrees |
---|---|
latitude | coordinate in decimal degrees |
Equivalent of the $ne operand
object | Value to query |
---|
Equivalent of the $nin operand
object | Value to query |
---|
Adds a new key to the query if not present yet. Sets this key as the current key.
key | MongoDB document key |
---|
Passes a regular expression for a query
regex | Regex pattern object |
---|
Equivalent of the $size operand
object | Value to query |
---|
Creates a new query with a document key
key | MongoDB document key |
---|
Equivalent to a $within operand, based on a bounding box using represented by two corners
x | the x coordinate of the first box corner. |
---|---|
y | the y coordinate of the first box corner. |
x2 | the x coordinate of the second box corner. |
y2 | the y coordinate of the second box corner. |
Equivalent of the $within operand, used for geospatial operation
x | x coordinate |
---|---|
y | y coordinate |
radius | radius |
Equivalent of the $centerSphere operand mostly intended for queries up to a few hundred miles or km.
longitude | coordinate in decimal degrees |
---|---|
latitude | coordinate in decimal degrees |
maxDistance | max spherical distance |
Equivalent to a $within operand, based on a bounding polygon represented by an array of points
points | an array of Double[] defining the vertices of the search area |
---|