public class MongoDBQueryDescriptor extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
MongoDBQueryDescriptor.Operation |
| Constructor and Description |
|---|
MongoDBQueryDescriptor(String collectionName,
MongoDBQueryDescriptor.Operation operation,
com.mongodb.DBObject criteria,
com.mongodb.DBObject projection,
com.mongodb.DBObject orderBy,
com.mongodb.DBObject options,
com.mongodb.DBObject updateOrInsert,
List<String> unwinds) |
MongoDBQueryDescriptor(String collectionName,
MongoDBQueryDescriptor.Operation operation,
List<com.mongodb.DBObject> pipeline) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCollectionName()
The name of the collection to select from.
|
com.mongodb.DBObject |
getCriteria()
Criteria describing the records to apply this query to.
|
MongoDBQueryDescriptor.Operation |
getOperation() |
com.mongodb.DBObject |
getOptions()
Returns (optional) query options if this is a INSERT, UPDATE or REMOVE query.
|
com.mongodb.DBObject |
getOrderBy()
Get the order criteria of the result of the query.
|
List<com.mongodb.DBObject> |
getPipeline() |
com.mongodb.DBObject |
getProjection()
The fields to be selected, if this query doesn't return all fields of the entity.
|
List<String> |
getUnwinds() |
com.mongodb.DBObject |
getUpdateOrInsert()
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<com.mongodb.DBObject> pipeline)
public MongoDBQueryDescriptor(String collectionName, MongoDBQueryDescriptor.Operation operation, com.mongodb.DBObject criteria, com.mongodb.DBObject projection, com.mongodb.DBObject orderBy, com.mongodb.DBObject options, com.mongodb.DBObject updateOrInsert, List<String> unwinds)
public List<com.mongodb.DBObject> getPipeline()
public String getCollectionName()
public MongoDBQueryDescriptor.Operation getOperation()
public com.mongodb.DBObject getCriteria()
DBObject representing the criteriapublic com.mongodb.DBObject getProjection()
keys
parameter of the MongoDB find API.DBObject representing the projectionpublic com.mongodb.DBObject getOrderBy()
DBObject representing the order to apply the results of the querypublic com.mongodb.DBObject getOptions()
public com.mongodb.DBObject getUpdateOrInsert()
Copyright © 2010–2017 Hibernate. All rights reserved.