@java.lang.SuppressWarnings("rawtypes") public class MongoQuery extends BsonQuery implements QueryArgumentsAware
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 |
READ_CONCERN_ARGUMENT |
|
static java.lang.String |
WITHIN_OPERATOR |
|
private boolean |
isCodecPersister |
|
private ManualProjections |
manualProjections |
|
private EntityPersister |
mongoEntityPersister |
|
private AbstractMongoSession |
mongoSession |
|
private java.util.Map |
queryArguments |
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, THIS_PREFIX, WHERE_OPERATOR, groupByProjectionHandlers, operatorHandlers, projectProjectionHandlers, queryHandlers |
class Query |
criteria, entity, fetchStrategies, joinTypes, lockResult, max, offset, orderBy, projections, queryCache, session, uniqueResult |
Constructor and description |
---|
MongoQuery
(AbstractMongoSession session, PersistentEntity entity) |
Type Params | Return Type | Name and description |
---|---|---|
|
private static java.lang.String |
addProjectionToGroupBy(org.bson.Document projectObject, org.bson.Document groupBy, PropertyProjection projection, java.lang.String operator, java.lang.String prefix) |
|
protected MongoQuery.AggregatePipeline |
buildAggregatePipeline(PersistentEntity entity, org.bson.Document query, java.util.List<Projection> projectionList) |
|
private java.lang.Object |
createObjectFromDBObject(org.bson.Document dbObject) |
|
protected org.bson.Document |
createQueryObject(PersistentEntity persistentEntity) |
|
public java.lang.Object |
encode(Embedded embedded, java.lang.Object instance) |
|
public java.lang.Object |
encode(Embedded embedded, java.lang.Object instance) |
|
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() |
|
public Query |
geoIntersects(java.lang.String property, GeoJSON shape) Geospacial query for values within the given shape |
|
public Query |
geoWithin(java.lang.String property, Shape shape) Geospacial query for values within the given shape |
|
private org.bson.Document |
getClassFieldDocument(PersistentEntity entity) |
|
private static org.bson.Document |
getIdObjectForGroupBy(org.bson.Document groupBy) |
|
public org.bson.Document |
getMongoQuery() Gets the Mongo query for this query instance |
|
public void |
handle(EmbeddedQueryEncoder queryEncoder, IdEquals criterion, org.bson.Document query, PersistentEntity entity) |
|
public void |
handle(EmbeddedQueryEncoder queryEncoder, AssociationQuery criterion, org.bson.Document query, PersistentEntity entity) |
|
public void |
handle(EmbeddedQueryEncoder queryEncoder, MongoQuery.WithinBox withinBox, org.bson.Document query, PersistentEntity entity) |
|
public void |
handle(EmbeddedQueryEncoder queryEncoder, MongoQuery.WithinPolygon withinPolygon, org.bson.Document query, PersistentEntity entity) |
|
public void |
handle(EmbeddedQueryEncoder queryEncoder, MongoQuery.WithinCircle withinCentre, org.bson.Document query, PersistentEntity entity) |
|
public void |
handle(EmbeddedQueryEncoder queryEncoder, Near near, org.bson.Document query, PersistentEntity entity) |
|
public void |
handle(EmbeddedQueryEncoder queryEncoder, MongoQuery.GeoWithin geoWithin, org.bson.Document query, PersistentEntity entity) |
|
public void |
handle(EmbeddedQueryEncoder queryEncoder, MongoQuery.GeoIntersects geoIntersects, org.bson.Document query, PersistentEntity entity) |
|
public void |
handle(EmbeddedQueryEncoder queryEncoder, Conjunction criterion, org.bson.Document query, PersistentEntity entity) |
|
public void |
handle(EmbeddedQueryEncoder queryEncoder, Disjunction criterion, org.bson.Document query, PersistentEntity entity) |
|
public java.lang.String |
handle(PersistentEntity entity, org.bson.Document projectObject, org.bson.Document groupBy, AvgProjection projection) |
|
public java.lang.String |
handle(PersistentEntity entity, org.bson.Document projectObject, org.bson.Document groupBy, CountProjection projection) |
|
public java.lang.String |
handle(PersistentEntity entity, org.bson.Document projectObject, org.bson.Document groupBy, CountDistinctProjection projection) |
|
public java.lang.String |
handle(PersistentEntity entity, org.bson.Document projectObject, org.bson.Document groupBy, MinProjection projection) |
|
public java.lang.String |
handle(PersistentEntity entity, org.bson.Document projectObject, org.bson.Document groupBy, MaxProjection projection) |
|
public java.lang.String |
handle(PersistentEntity entity, org.bson.Document projectObject, org.bson.Document groupBy, SumProjection projection) |
|
public java.lang.String |
handle(PersistentEntity entity, org.bson.Document projectObject, org.bson.Document groupBy, DistinctPropertyProjection projection) |
|
public java.lang.String |
handle(PersistentEntity entity, org.bson.Document projectObject, org.bson.Document groupBy, PropertyProjection projection) |
|
public java.lang.String |
handle(PersistentEntity entity, org.bson.Document projectObject, org.bson.Document groupBy, IdProjection projection) |
|
public Query |
near(java.lang.String property, java.util.List value) Geospacial query for values near the given two dimensional list |
|
public Query |
near(java.lang.String property, Point value) Geospacial query for values near the given two dimensional list |
|
public Query |
near(java.lang.String property, java.util.List value, Distance maxDistance) Geospacial query for values near the given two dimensional list |
|
public Query |
near(java.lang.String property, Point value, Distance maxDistance) Geospacial query for values near the given two dimensional list |
|
public Query |
near(java.lang.String property, java.util.List value, java.lang.Number maxDistance) Geospacial query for values near the given two dimensional list |
|
public Query |
near(java.lang.String property, Point value, java.lang.Number maxDistance) Geospacial query for values near the given two dimensional list |
|
public Query |
nearSphere(java.lang.String property, java.util.List value) Geospacial query for values near the given two dimensional list |
|
public Query |
nearSphere(java.lang.String property, Point value) Geospacial query for values near the given two dimensional list |
|
public Query |
nearSphere(java.lang.String property, java.util.List value, Distance maxDistance) Geospacial query for values near the given two dimensional list |
|
public Query |
nearSphere(java.lang.String property, Point value, Distance maxDistance) Geospacial query for values near the given two dimensional list |
|
public Query |
nearSphere(java.lang.String property, java.util.List value, java.lang.Number maxDistance) Geospacial query for values near the given two dimensional list |
|
public Query |
nearSphere(java.lang.String property, Point value, java.lang.Number maxDistance) Geospacial query for values near the given two dimensional list |
|
public static void |
populateMongoQuery(AbstractMongoSession session, org.bson.Document query, Junction criteria, PersistentEntity entity) |
|
public static void |
populateMongoQuery(EmbeddedQueryEncoder queryEncoder, org.bson.Document query, Junction criteria, PersistentEntity entity) |
|
public void |
setArguments(java.util.Map arguments)
|
|
private com.mongodb.client.MongoIterable<org.bson.Document> |
setHint(com.mongodb.client.MongoIterable<org.bson.Document> cursor) |
|
public Query |
withinBox(java.lang.String property, java.util.List value) Geospacial query for values within a given box. |
|
public Query |
withinCircle(java.lang.String property, java.util.List value) Geospacial query for values within a given circle. |
|
public Query |
withinPolygon(java.lang.String property, java.util.List value) Geospacial query for values within a given polygon. |
|
private java.util.List |
wrapObjectResultInList(java.lang.Object object) |
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