Module spring.data.mongodb
Class SetOperators.SetOperatorFactory
java.lang.Object
org.springframework.data.mongodb.core.aggregation.SetOperators.SetOperatorFactory
- Enclosing class:
- SetOperators
- Author:
- Christoph Strobl
-
Constructor Summary
ConstructorsConstructorDescriptionSetOperatorFactory(String fieldReference) Creates newSetOperators.SetOperatorFactoryfor given fieldReference.SetOperatorFactory(AggregationExpression expression) Creates newSetOperators.SetOperatorFactoryfor givenAggregationExpression. -
Method Summary
Modifier and TypeMethodDescriptionCreates newAggregationExpressionthat tkes array of the previously mentioned field and returns true if no elements is false.Creates newAggregationExpressionthat takes array of the previously mentioned field and returns true if any of the elements are true and false otherwise.differenceTo(String arrayReference) Creates newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat takes array of the previously mentioned field and returns true if it is a subset of the given arrayReference.isSubsetOf(AggregationExpression expression) Creates newAggregationExpressionthat takes array of the previously mentioned field and returns true if it is a subset of the givenAggregationExpression.Creates newAggregationExpressionthat 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 newAggregationExpressionthat 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.SetOperatorFactoryfor given fieldReference.- Parameters:
fieldReference- must not be null.
-
SetOperatorFactory
Creates newSetOperators.SetOperatorFactoryfor givenAggregationExpression.- Parameters:
expression- must not be null.
-
-
Method Details
-
isEqualTo
Creates newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat 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 newAggregationExpressionthat tkes array of the previously mentioned field and returns true if no elements is false.- Returns:
- new instance of
SetOperators.AllElementsTrue.
-