public static class DocumentOperators.Shift extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractAggregationExpression.Expand
Expand a nested list of values to single entries or keep the list.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<Object> |
append(Object value) |
protected List<Object> |
append(Object value,
AbstractAggregationExpression.Expand expandList) |
protected Map<String,Object> |
append(String key,
Object value) |
protected Map<String,Object> |
appendAt(int index,
String key,
Object value)
Append the given key at the position in the underlying
LinkedHashMap. |
protected Map<String,Object> |
argumentMap()
Get the argument map.
|
protected static List<Field> |
asFields(String... fieldRefs) |
DocumentOperators.Shift |
by(int shiftBy)
Shift the document position relative to the current.
|
protected boolean |
contains(Object key)
Check if the given key is available.
|
DocumentOperators.Shift |
defaultTo(Object value)
Define the default value if the target document is out of range.
|
DocumentOperators.Shift |
defaultToValueOf(AggregationExpression expression)
Define the
expression to evaluate if the target document is out of range. |
protected <T> T |
get(int index)
Get the value at a given index.
|
protected <T> T |
get(Object key)
Get the value for a given key.
|
protected String |
getMongoMethod() |
protected Map<String,Object> |
remove(String key) |
static DocumentOperators.Shift |
shift(AggregationExpression expression)
Specifies the
expression to evaluate and return. |
static DocumentOperators.Shift |
shift(String fieldReference)
Specifies the field to evaluate and return.
|
org.bson.Document |
toDocument(AggregationOperationContext context)
|
org.bson.Document |
toDocument(Object value,
AggregationOperationContext context) |
protected List<Object> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfrom, toDocumentcreate, createpublic static DocumentOperators.Shift shift(String fieldReference)
fieldReference - must not be null.DocumentOperators.Shift.public static DocumentOperators.Shift shift(AggregationExpression expression)
expression to evaluate and return.expression - must not be null.DocumentOperators.Shift.public DocumentOperators.Shift by(int shiftBy)
shiftBy - value to add to the current position.DocumentOperators.Shift.public DocumentOperators.Shift defaultTo(Object value)
value - must not be null.DocumentOperators.Shift.public DocumentOperators.Shift defaultToValueOf(AggregationExpression expression)
expression to evaluate if the target document is out of range.expression - must not be null.DocumentOperators.Shift.protected String getMongoMethod()
public org.bson.Document toDocument(AggregationOperationContext context)
AggregationExpressiontoDocument in interface AggregationExpressioncontext - must not be null.Document) form of the expression.public org.bson.Document toDocument(Object value, AggregationOperationContext context)
protected List<Object> append(Object value, AbstractAggregationExpression.Expand expandList)
protected Map<String,Object> appendAt(int index, String key, Object value)
LinkedHashMap.index - key - value - protected <T> T get(int index)
T - index - protected <T> T get(Object key)
T - key - protected boolean contains(Object key)
key - Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.