public static class ArrayOperators.ArrayElemAt extends Object
AggregationExpression for $arrayElementAt.| 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.
|
static ArrayOperators.ArrayElemAt |
arrayOf(AggregationExpression expression)
Creates new
ArrayOperators.ArrayElemAt. |
static ArrayOperators.ArrayElemAt |
arrayOf(Collection<?> values)
Creates new
ArrayOperators.ArrayElemAt. |
static ArrayOperators.ArrayElemAt |
arrayOf(String fieldReference)
Creates new
ArrayOperators.ArrayElemAt. |
protected static List<Field> |
asFields(String... fieldRefs) |
protected boolean |
contains(Object key)
Check if the given key is available.
|
ArrayOperators.ArrayElemAt |
elementAt(AggregationExpression expression)
Use the element at the index number evaluated from the given
AggregationExpression. |
ArrayOperators.ArrayElemAt |
elementAt(int index)
Use the element with given index number.
|
ArrayOperators.ArrayElemAt |
elementAt(String arrayFieldReference)
Use the element at the index number traken from the given field.
|
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) |
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, createprotected String getMongoMethod()
public static ArrayOperators.ArrayElemAt arrayOf(String fieldReference)
ArrayOperators.ArrayElemAt.fieldReference - must not be null.ArrayOperators.ArrayElemAt.public static ArrayOperators.ArrayElemAt arrayOf(AggregationExpression expression)
ArrayOperators.ArrayElemAt.expression - must not be null.ArrayOperators.ArrayElemAt.public static ArrayOperators.ArrayElemAt arrayOf(Collection<?> values)
ArrayOperators.ArrayElemAt.values - The array members. Must not be null.ArrayOperators.ArrayElemAt.public ArrayOperators.ArrayElemAt elementAt(int index)
index - the index numberArrayOperators.ArrayElemAt.public ArrayOperators.ArrayElemAt elementAt(AggregationExpression expression)
AggregationExpression.expression - must not be null.ArrayOperators.ArrayElemAt.public ArrayOperators.ArrayElemAt elementAt(String arrayFieldReference)
arrayFieldReference - the field name.ArrayOperators.ArrayElemAt.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–2021 Pivotal Software, Inc.. All rights reserved.