@java.lang.SuppressWarnings("rawtypes") public class MongoQuery extends BsonQuery
A Query implementation for the Mongo document store.
Modifiers | Name | Description |
---|---|---|
protected static class |
MongoQuery.AggregatePipeline |
|
static class |
MongoQuery.AggregatedResultList |
|
static class |
MongoQuery.GeoCriterion |
Used for all GeoSpacial queries using 2dsphere indexes |
static class |
MongoQuery.GeoIntersects |
|
static class |
MongoQuery.GeoWithin |
|
static class |
MongoQuery.MongoResultList |
|
static class |
MongoQuery.Near |
Used for Geospacial querying |
static class |
MongoQuery.NearSphere |
Used for Geospacial querying with the $nearSphere operator |
static class |
MongoQuery.ProjectedProperty |
|
static class |
MongoQuery.WithinBox |
Used for Geospacial querying of boxes |
static class |
MongoQuery.WithinCircle |
Used for Geospacial querying of circles |
static class |
MongoQuery.WithinPolygon |
Used for Geospacial querying of polygons |
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
BOX_OPERATOR |
|
static java.lang.String |
CENTER_OPERATOR |
|
static java.lang.String |
CENTER_SPHERE_OPERATOR |
|
static java.lang.String |
GEOMETRY_OPERATOR |
|
static java.lang.String |
GEO_INTERSECTS_OPERATOR |
|
static java.lang.String |
GEO_WITHIN_OPERATOR |
|
static java.lang.String |
HINT_ARGUMENT |
|
static java.lang.String |
MAX_DISTANCE_OPERATOR |
|
static java.lang.String |
MONGO_AND_OPERATOR |
|
static java.lang.String |
MONGO_GTE_OPERATOR |
|
static java.lang.String |
MONGO_GT_OPERATOR |
|
static java.lang.String |
MONGO_IN_OPERATOR |
|
static java.lang.String |
MONGO_LTE_OPERATOR |
|
static java.lang.String |
MONGO_LT_OPERATOR |
|
static java.lang.String |
MONGO_NE_OPERATOR |
|
static java.lang.String |
MONGO_NIN_OPERATOR |
|
static java.lang.String |
MONGO_OR_OPERATOR |
|
static java.lang.String |
MONGO_REGEX_OPERATOR |
|
static java.lang.String |
MONGO_WHERE_OPERATOR |
|
static java.lang.String |
NEAR_OPERATOR |
|
static java.lang.String |
NEAR_SPHERE_OPERATOR |
|
static java.lang.String |
POLYGON_OPERATOR |
|
static java.lang.String |
WITHIN_OPERATOR |
Fields inherited from class | Fields |
---|---|
class BsonQuery |
AND_OPERATOR, AVERAGE_OPERATOR, ENCODER_CONTEXT, EQ_OPERATOR, EXISTS_OPERATOR, GROUP_OPERATOR, GTE_OPERATOR, GT_OPERATOR, ID_REFERENCE_SUFFIX, IN_OPERATOR, LTE_OPERATOR, LT_OPERATOR, MATCH_OPERATOR, MAX_OPERATOR, MIN_OPERATOR, NE_OPERATOR, NIN_OPERATOR, NOR_OPERATOR, NOT_OPERATOR, OR_OPERATOR, PROJECT_OPERATOR, REGEX_OPERATOR, SIZE_OPERATOR, SORT_OPERATOR, SUM_OPERATOR, WHERE_OPERATOR, groupByProjectionHandlers, operatorHandlers, projectProjectionHandlers, queryHandlers |
class Query |
criteria, entity, fetchStrategies, lockResult, max, offset, orderBy, projections, queryCache, session, uniqueResult |
Constructor and description |
---|
MongoQuery
(AbstractMongoSession session, PersistentEntity entity) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected MongoQuery.AggregatePipeline |
buildAggregatePipeline(PersistentEntity entity, org.bson.Document query, java.util.List<Projection> projectionList) |
|
protected org.bson.Document |
createQueryObject(PersistentEntity persistentEntity) |
|
protected java.util.List |
executeQuery(PersistentEntity entity, Junction criteria) |
|
protected com.mongodb.client.MongoCursor<org.bson.Document> |
executeQuery(PersistentEntity entity, Junction criteria, com.mongodb.client.MongoCollection<org.bson.Document> collection, org.bson.Document query) |
|
protected com.mongodb.client.FindIterable<org.bson.Document> |
executeQueryAndApplyPagination(com.mongodb.client.MongoCollection<org.bson.Document> collection, org.bson.Document query) |
|
protected void |
flushBeforeQuery() |
|
Query |
geoIntersects(java.lang.String property, GeoJSON shape) Geospacial query for values within the given shape |
|
Query |
geoWithin(java.lang.String property, Shape shape) Geospacial query for values within the given shape |
|
org.bson.Document |
getMongoQuery() Gets the Mongo query for this query instance |
|
Query |
near(java.lang.String property, java.util.List value) Geospacial query for values near the given two dimensional list |
|
Query |
near(java.lang.String property, Point value) Geospacial query for values near the given two dimensional list |
|
Query |
near(java.lang.String property, java.util.List value, Distance maxDistance) Geospacial query for values near the given two dimensional list |
|
Query |
near(java.lang.String property, Point value, Distance maxDistance) Geospacial query for values near the given two dimensional list |
|
Query |
near(java.lang.String property, java.util.List value, java.lang.Number maxDistance) Geospacial query for values near the given two dimensional list |
|
Query |
near(java.lang.String property, Point value, java.lang.Number maxDistance) Geospacial query for values near the given two dimensional list |
|
Query |
nearSphere(java.lang.String property, java.util.List value) Geospacial query for values near the given two dimensional list |
|
Query |
nearSphere(java.lang.String property, Point value) Geospacial query for values near the given two dimensional list |
|
Query |
nearSphere(java.lang.String property, java.util.List value, Distance maxDistance) Geospacial query for values near the given two dimensional list |
|
Query |
nearSphere(java.lang.String property, Point value, Distance maxDistance) Geospacial query for values near the given two dimensional list |
|
Query |
nearSphere(java.lang.String property, java.util.List value, java.lang.Number maxDistance) Geospacial query for values near the given two dimensional list |
|
Query |
nearSphere(java.lang.String property, Point value, java.lang.Number maxDistance) Geospacial query for values near the given two dimensional list |
|
static void |
populateMongoQuery(AbstractMongoSession session, org.bson.Document query, Junction criteria, PersistentEntity entity) |
|
static void |
populateMongoQuery(EmbeddedQueryEncoder queryEncoder, org.bson.Document query, Junction criteria, PersistentEntity entity) |
|
void |
setArguments(java.util.Map arguments) @param arguments The query arguments |
|
Query |
withinBox(java.lang.String property, java.util.List value) Geospacial query for values within a given box. |
|
Query |
withinCircle(java.lang.String property, java.util.List value) Geospacial query for values within a given circle. |
|
Query |
withinPolygon(java.lang.String property, java.util.List value) Geospacial query for values within a given polygon. |
Methods inherited from class | Name |
---|---|
class BsonQuery |
createBsonQuery, createBsonQuery, getInListQueryValues, getOrCreatePropertyQuery, getPropertyName, getPropertyName, parse, populateBsonQuery, populateBsonQuery, readBsonValue |
class Query |
add, add, allEq, and, between, cache, clone, conjunction, createQuery, disjunction, eq, executeQuery, fetchStrategy, firstResult, flushBeforeQuery, ge, getCriteria, getEntity, getOrderBy, getSession, gt, gte, idEq, ilike, in, isEmpty, isNotEmpty, isNotNull, isNull, join, le, like, list, lock, lock, lt, lte, max, maxResults, negation, offset, or, order, patternToRegex, projections, resolveIdIfEntity, rlike, select, setUniqueResult, singleResult |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Geospacial query for values within the given shape
property
- The propertyshape
- The shapeGeospacial query for values within the given shape
property
- The propertyshape
- The shapeGets the Mongo query for this query instance
Geospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of valuesGeospacial query for values near the given two dimensional list
property
- The propertyvalue
- A two dimensional list of values
arguments
- The query argumentsGeospacial query for values within a given box. A box is defined as a multi-dimensional list in the form [[40.73083, -73.99756], [40.741404, -73.988135]]
property
- The propertyvalue
- A multi-dimensional list of valuesGeospacial query for values within a given circle. A circle is defined as a multi-dimensial list containing the position of the center and the radius: [[50, 50], 10]
property
- The propertyvalue
- A multi-dimensional list of valuesGeospacial query for values within a given polygon. A polygon is defined as a multi-dimensional list in the form [[0, 0], [3, 6], [6, 0]]
property
- The propertyvalue
- A multi-dimensional list of values