Class SetOperators.SetOperatorFactory
java.lang.Object
org.springframework.data.mongodb.core.aggregation.SetOperators.SetOperatorFactory
- Enclosing class:
- SetOperators
- Author:
- Christoph Strobl
-
Constructor Summary
ConstructorDescriptionSetOperatorFactory
(String fieldReference) Creates newSetOperators.SetOperatorFactory
for given fieldReference.SetOperatorFactory
(AggregationExpression expression) Creates newSetOperators.SetOperatorFactory
for givenAggregationExpression
. -
Method Summary
Modifier and TypeMethodDescriptionCreates newAggregationExpression
that tkes array of the previously mentioned field and returns true if no elements is false.Creates newAggregationExpression
that takes array of the previously mentioned field and returns true if any of the elements are true and false otherwise.differenceTo
(String arrayReference) Creates newAggregationExpression
that takes array of the previously mentioned field and returns an array containing the elements that do not exist in the given arrayReference.differenceTo
(AggregationExpression expression) Creates newAggregationExpression
that takes array of the previously mentioned field and returns an array containing the elements that do not exist in the givenAggregationExpression
.intersects
(String... arrayReferences) Creates newAggregationExpression
that takes array of the previously mentioned field and one or more arrays and returns an array that contains the elements that appear in every of those.intersects
(AggregationExpression... expressions) Creates newAggregationExpression
that takes array of the previously mentioned field and one or more arrays and returns an array that contains the elements that appear in every of those.Creates newAggregationExpression
that compares the previously mentioned field to one or more arrays and returns true if they have the same distinct elements and false otherwise.isEqualTo
(AggregationExpression... expressions) Creates newAggregationExpression
that compares the previously mentioned field to one or more arrays and returns true if they have the same distinct elements and false otherwise.isSubsetOf
(String arrayReference) Creates newAggregationExpression
that takes array of the previously mentioned field and returns true if it is a subset of the given arrayReference.isSubsetOf
(AggregationExpression expression) Creates newAggregationExpression
that takes array of the previously mentioned field and returns true if it is a subset of the givenAggregationExpression
.Creates newAggregationExpression
that takes array of the previously mentioned field and one or more arrays and returns an array that contains the elements that appear in any of those.union
(AggregationExpression... expressions) Creates newAggregationExpression
that takes array of the previously mentioned field and one or more arrays and returns an array that contains the elements that appear in any of those.
-
Constructor Details
-
SetOperatorFactory
Creates newSetOperators.SetOperatorFactory
for given fieldReference.- Parameters:
fieldReference
- must not be null.
-
SetOperatorFactory
Creates newSetOperators.SetOperatorFactory
for givenAggregationExpression
.- Parameters:
expression
- must not be null.
-
-
Method Details
-
isEqualTo
Creates newAggregationExpression
that compares the previously mentioned field to one or more arrays and returns true if they have the same distinct elements and false otherwise.- Parameters:
arrayReferences
- must not be null.- Returns:
- new instance of
SetOperators.SetEquals
.
-
isEqualTo
Creates newAggregationExpression
that compares the previously mentioned field to one or more arrays and returns true if they have the same distinct elements and false otherwise.- Parameters:
expressions
- must not be null.- Returns:
- new instance of
SetOperators.SetEquals
.
-
intersects
Creates newAggregationExpression
that takes array of the previously mentioned field and one or more arrays and returns an array that contains the elements that appear in every of those.- Parameters:
arrayReferences
- must not be null.- Returns:
- new instance of
SetOperators.SetIntersection
.
-
intersects
Creates newAggregationExpression
that takes array of the previously mentioned field and one or more arrays and returns an array that contains the elements that appear in every of those.- Parameters:
expressions
- must not be null.- Returns:
- new instance of
SetOperators.SetIntersection
.
-
union
Creates newAggregationExpression
that takes array of the previously mentioned field and one or more arrays and returns an array that contains the elements that appear in any of those.- Parameters:
arrayReferences
- must not be null.- Returns:
- new instance of
SetOperators.SetUnion
.
-
union
Creates newAggregationExpression
that takes array of the previously mentioned field and one or more arrays and returns an array that contains the elements that appear in any of those.- Parameters:
expressions
- must not be null.- Returns:
- new instance of
SetOperators.SetUnion
.
-
differenceTo
Creates newAggregationExpression
that takes array of the previously mentioned field and returns an array containing the elements that do not exist in the given arrayReference.- Parameters:
arrayReference
- must not be null.- Returns:
- new instance of
SetOperators.SetDifference
.
-
differenceTo
Creates newAggregationExpression
that takes array of the previously mentioned field and returns an array containing the elements that do not exist in the givenAggregationExpression
.- Parameters:
expression
- must not be null.- Returns:
- new instance of
SetOperators.SetDifference
.
-
isSubsetOf
Creates newAggregationExpression
that takes array of the previously mentioned field and returns true if it is a subset of the given arrayReference.- Parameters:
arrayReference
- must not be null.- Returns:
- new instance of
SetOperators.SetIsSubset
.
-
isSubsetOf
Creates newAggregationExpression
that takes array of the previously mentioned field and returns true if it is a subset of the givenAggregationExpression
.- Parameters:
expression
- must not be null.- Returns:
- new instance of
SetOperators.SetIsSubset
.
-
anyElementTrue
Creates newAggregationExpression
that takes array of the previously mentioned field and returns true if any of the elements are true and false otherwise.- Returns:
- new instance of
SetOperators.AnyElementTrue
.
-
allElementsTrue
Creates newAggregationExpression
that tkes array of the previously mentioned field and returns true if no elements is false.- Returns:
- new instance of
SetOperators.AllElementsTrue
.
-