| Constructor and Description |
|---|
BasicQuery(org.bson.Document queryObject)
Create a new
BasicQuery given a query Document. |
BasicQuery(org.bson.Document queryObject,
org.bson.Document fieldsObject)
|
BasicQuery(String query)
Create a new
BasicQuery given a JSON query. |
BasicQuery(String query,
String fields)
|
| Modifier and Type | Method and Description |
|---|---|
Query |
addCriteria(CriteriaDefinition criteria)
Adds the given
CriteriaDefinition to the current Query. |
boolean |
equals(Object o) |
org.bson.Document |
getFieldsObject() |
org.bson.Document |
getQueryObject() |
org.bson.Document |
getSortObject() |
int |
hashCode() |
boolean |
isSorted()
Returns true if the
Query has a sort parameter. |
protected void |
setFieldsObject(org.bson.Document fieldsObject)
Set the fields (projection)
Document. |
void |
setSortObject(org.bson.Document sortObject)
Set the sort
Document. |
collation, comment, cursorBatchSize, exhaust, fields, getCollation, getCriteria, getHint, getLimit, getMeta, getRestrictedTypes, getSkip, isRestrictedTypeKey, limit, maxScan, maxTime, maxTime, maxTimeMsec, noCursorTimeout, of, partialResults, query, querySettingsEquals, restrict, setMeta, skip, slaveOk, toString, useSnapshot, with, with, withHint, withHintpublic BasicQuery(@Nullable String query)
BasicQuery given a JSON query.query - may be null.public BasicQuery(org.bson.Document queryObject)
BasicQuery given a query Document.queryObject - must not be null.public BasicQuery(@Nullable String query, @Nullable String fields)
query - may be null.fields - may be null.public BasicQuery(org.bson.Document queryObject,
org.bson.Document fieldsObject)
queryObject - must not be null.fieldsObject - must not be null.IllegalArgumentException - when sortObject or fieldsObject is null.public Query addCriteria(CriteriaDefinition criteria)
QueryCriteriaDefinition to the current Query.addCriteria in class Querycriteria - must not be null.public org.bson.Document getQueryObject()
getQueryObject in class QueryDocument.public org.bson.Document getFieldsObject()
getFieldsObject in class QueryDocument.public org.bson.Document getSortObject()
getSortObject in class QueryDocument.public void setSortObject(org.bson.Document sortObject)
Document.sortObject - must not be null.IllegalArgumentException - when sortObject is null.public boolean isSorted()
QueryQuery has a sort parameter.isSorted in class QuerySort.isSorted()protected void setFieldsObject(org.bson.Document fieldsObject)
Document.fieldsObject - must not be null.IllegalArgumentException - when fieldsObject is null.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.