public class MongoDBQueryDescriptor extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
MongoDBQueryDescriptor.Operation
Enum with operations
|
| Constructor and Description |
|---|
MongoDBQueryDescriptor(String collectionName,
MongoDBQueryDescriptor.Operation operation,
org.bson.Document criteria,
org.bson.Document projection,
org.bson.Document orderBy,
org.bson.Document options,
org.bson.Document updateOrInsertOne,
List<org.bson.Document> updateOrInsertMany,
List<String> unwinds,
String distinctFieldName,
String mapFunction,
String reduceFunction) |
MongoDBQueryDescriptor(String collectionName,
MongoDBQueryDescriptor.Operation operation,
List<org.bson.Document> pipeline) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCollectionName()
The name of the collection to select from.
|
org.bson.Document |
getCriteria()
Criteria describing the records to apply this query to.
|
String |
getDistinctFieldName()
Name of field on which distinct query will be performed
|
String |
getMapFunction()
Returns map function in the MAP_REDUCE operation
|
MongoDBQueryDescriptor.Operation |
getOperation() |
org.bson.Document |
getOptions()
Returns (optional) query options if this is a INSERT, UPDATE or REMOVE query.
|
org.bson.Document |
getOrderBy()
Get the order criteria of the result of the query.
|
List<org.bson.Document> |
getPipeline() |
org.bson.Document |
getProjection()
The fields to be selected, if this query doesn't return all fields of the entity.
|
String |
getReduceFunction()
Returns reduce function in the MAP_REDUCE operation
|
List<String> |
getUnwinds() |
List<org.bson.Document> |
getUpdateOrInsertMany() |
org.bson.Document |
getUpdateOrInsertOne()
Returns the update (new values to apply) in case this is an UPDATE query or values to insert in case this is an
INSERT query.
|
String |
toString() |
public MongoDBQueryDescriptor(String collectionName, MongoDBQueryDescriptor.Operation operation, List<org.bson.Document> pipeline)
public MongoDBQueryDescriptor(String collectionName, MongoDBQueryDescriptor.Operation operation, org.bson.Document criteria, org.bson.Document projection, org.bson.Document orderBy, org.bson.Document options, org.bson.Document updateOrInsertOne, List<org.bson.Document> updateOrInsertMany, List<String> unwinds, String distinctFieldName, String mapFunction, String reduceFunction)
public List<org.bson.Document> getPipeline()
public String getCollectionName()
public MongoDBQueryDescriptor.Operation getOperation()
public org.bson.Document getCriteria()
Document representing the criteriapublic org.bson.Document getProjection()
keys
parameter of the MongoDB find API.Document representing the projectionpublic org.bson.Document getOrderBy()
Document representing the order to apply the results of the querypublic org.bson.Document getOptions()
public org.bson.Document getUpdateOrInsertOne()
public List<org.bson.Document> getUpdateOrInsertMany()
public String getDistinctFieldName()
public String getMapFunction()
public String getReduceFunction()
Copyright © 2010–2017 Hibernate. All rights reserved.