Module spring.data.mongodb
Class ArrayOperators
java.lang.Object
org.springframework.data.mongodb.core.aggregation.ArrayOperators
Gateway to array aggregation operations.
- Since:
- 1.0
- Author:
- Christoph Strobl, Mark Paluch, Shashank Sharma, Divya Srivastava
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAggregationExpressionfor$arrayElementAt.static classstatic classAggregationExpressionfor$arrayToObjectthat transforms an array into a single document.static classAggregationExpressionfor$concatArrays.static class$filterAggregationExpressionallows to select a subset of the array to return based on the specified condition.static classAggregationExpressionfor$firstthat returns the first element in an array.static classAggregationExpressionfor$in.static classAggregationExpressionfor$indexOfArray.static classAggregationExpressionfor$isArray.static classAggregationExpressionfor$lastthat returns the last element in an array.static classAggregationExpressionfor$range.static classAggregationExpressionfor$reduce.static classAggregationExpressionfor$reverseArray.static classAggregationExpressionfor$size.static classAggregationExpressionfor$slice.static classAggregationExpressionfor$sortArraythat sorts elements in an array.static classAggregationExpressionfor$zip. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTake the array referenced by given fieldReference.arrayOf(Collection<?> values) Take the givenvaluesAggregationExpression.arrayOf(AggregationExpression expression) Take the array referenced resulting from the givenAggregationExpression.
-
Constructor Details
-
ArrayOperators
public ArrayOperators()
-
-
Method Details
-
arrayOf
Take the array referenced by given fieldReference.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
ArrayOperators.ArrayOperatorFactory.
-
arrayOf
Take the array referenced resulting from the givenAggregationExpression.- Parameters:
expression- must not be null.- Returns:
- new instance of
ArrayOperators.ArrayOperatorFactory.
-
arrayOf
Take the givenvaluesAggregationExpression.- Parameters:
values- must not be null.- Returns:
- new instance of
ArrayOperators.ArrayOperatorFactory. - Since:
- 2.2
-