Package com.mongodb
Class QueryBuilder
java.lang.Object
com.mongodb.QueryBuilder
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
Utility for creating DBObject queries
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Equivalent of the $all operandDeprecated.Equivalent to an $and operandDeprecated.Equivalent toQueryBuilder.put(key).Deprecated.Equivalent to the $elemMatch operandDeprecated.Equivalent of the $exists operandget()Deprecated.Creates aDBObjectquery to be used for the driver's find operationsgreaterThan(Object object) Deprecated.Equivalent to the $gt operatorgreaterThanEquals(Object object) Deprecated.Equivalent to the $gte operatorDeprecated.Equivalent of the $in operandDeprecated.Equivalent of the find({key:value})Deprecated.Equivalent to the $lt operandlessThanEquals(Object object) Deprecated.Equivalent to the $lte operandDeprecated.Equivalent of the $mod operandnear(double x, double y) Deprecated.Equivalent of the $near operandnear(double x, double y, double maxDistance) Deprecated.Equivalent of the $near operandnearSphere(double longitude, double latitude) Deprecated.Equivalent of the $nearSphere operandnearSphere(double longitude, double latitude, double maxDistance) Deprecated.Equivalent of the $nearSphere operandnot()Deprecated.Equivalent to $not meta operator.Deprecated.Equivalent of the $ne operandDeprecated.Equivalent of the $nin operandDeprecated.Equivalent to an $or operandDeprecated.Adds a new key to the query if not present yet.Deprecated.Passes a regular expression for a queryDeprecated.Equivalent of the $size operandstatic QueryBuilderstart()Deprecated.Returns a new QueryBuilder.static QueryBuilderDeprecated.Creates a new query with a document keyDeprecated.Equivalent to a $text operand.Deprecated.Equivalent to a $text operand.withinBox(double x, double y, double x2, double y2) Deprecated.Equivalent to a $within operand, based on a bounding box using represented by two cornerswithinCenter(double x, double y, double radius) Deprecated.Equivalent of the $within operand, used for geospatial operationwithinCenterSphere(double longitude, double latitude, double maxDistance) Deprecated.Equivalent of the $centerSphere operand mostly intended for queries up to a few hundred miles or km.withinPolygon(List<Double[]> points) Deprecated.Equivalent to a $within operand, based on a bounding polygon represented by an array of points
-
Constructor Details
-
QueryBuilder
public QueryBuilder()Deprecated.Creates a builder with an empty query
-
-
Method Details
-
start
Deprecated.Returns a new QueryBuilder.- Returns:
- a builder
-
start
Deprecated.Creates a new query with a document key- Parameters:
key- MongoDB document key- Returns:
this
-
put
Deprecated.Adds a new key to the query if not present yet. Sets this key as the current key.- Parameters:
key- MongoDB document key- Returns:
this
-
and
Deprecated.Equivalent toQueryBuilder.put(key). Intended for compound query chains to be more readable, e.g.QueryBuilder.start("a").greaterThan(1).and("b").lessThan(3)- Parameters:
key- MongoDB document key- Returns:
this
-
greaterThan
Deprecated.Equivalent to the $gt operator- Parameters:
object- Value to query- Returns:
this
-
greaterThanEquals
Deprecated.Equivalent to the $gte operator- Parameters:
object- Value to query- Returns:
this
-
lessThan
Deprecated.Equivalent to the $lt operand- Parameters:
object- Value to query- Returns:
this
-
lessThanEquals
Deprecated.Equivalent to the $lte operand- Parameters:
object- Value to query- Returns:
this
-
is
Deprecated.Equivalent of the find({key:value})- Parameters:
object- Value to query- Returns:
this
-
notEquals
Deprecated.Equivalent of the $ne operand- Parameters:
object- Value to query- Returns:
this
-
in
Deprecated.Equivalent of the $in operand- Parameters:
object- Value to query- Returns:
this
-
notIn
Deprecated.Equivalent of the $nin operand- Parameters:
object- Value to query- Returns:
this
-
mod
Deprecated.Equivalent of the $mod operand- Parameters:
object- Value to query- Returns:
this
-
all
Deprecated.Equivalent of the $all operand- Parameters:
object- Value to query- Returns:
this
-
size
Deprecated.Equivalent of the $size operand- Parameters:
object- Value to query- Returns:
this
-
exists
Deprecated.Equivalent of the $exists operand- Parameters:
object- Value to query- Returns:
this
-
regex
Deprecated.Passes a regular expression for a query- Parameters:
regex- Regex pattern object- Returns:
this
-
elemMatch
Deprecated.Equivalent to the $elemMatch operand- Parameters:
match- the object to match- Returns:
this
-
withinCenter
Deprecated.Equivalent of the $within operand, used for geospatial operation- Parameters:
x- x coordinatey- y coordinateradius- radius- Returns:
this
-
near
Deprecated.Equivalent of the $near operand- Parameters:
x- x coordinatey- y coordinate- Returns:
this
-
near
Deprecated.Equivalent of the $near operand- Parameters:
x- x coordinatey- y coordinatemaxDistance- max distance- Returns:
this
-
nearSphere
Deprecated.Equivalent of the $nearSphere operand- Parameters:
longitude- coordinate in decimal degreeslatitude- coordinate in decimal degrees- Returns:
this
-
nearSphere
Deprecated.Equivalent of the $nearSphere operand- Parameters:
longitude- coordinate in decimal degreeslatitude- coordinate in decimal degreesmaxDistance- max spherical distance- Returns:
this
-
withinCenterSphere
Deprecated.Equivalent of the $centerSphere operand mostly intended for queries up to a few hundred miles or km.- Parameters:
longitude- coordinate in decimal degreeslatitude- coordinate in decimal degreesmaxDistance- max spherical distance- Returns:
this
-
withinBox
Deprecated.Equivalent to a $within operand, based on a bounding box using represented by two corners- Parameters:
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.- Returns:
this
-
withinPolygon
Deprecated.Equivalent to a $within operand, based on a bounding polygon represented by an array of points- Parameters:
points- an array of Double[] defining the vertices of the search area- Returns:
this
-
text
Deprecated.Equivalent to a $text operand.- Parameters:
search- the search terms to apply to the text index.- Returns:
this
-
text
Deprecated.Equivalent to a $text operand.- Parameters:
search- the search terms to apply to the text index.language- the language to use.- Returns:
this
-
not
Deprecated.Equivalent to $not meta operator. Must be followed by an operand, not a value, e.g.QueryBuilder.start("val").not().mod(Arrays.asList(10, 1))- Returns:
this
-
or
Deprecated.Equivalent to an $or operand- Parameters:
ors- the list of conditions to or together- Returns:
this
-
and
Deprecated.Equivalent to an $and operand- Parameters:
ands- the list of conditions to and together- Returns:
this
-
get
Deprecated.Creates aDBObjectquery to be used for the driver's find operations- Returns:
this- Throws:
RuntimeException- if a key does not have a matching operand
-