Class RedactOperation.RedactOperationBuilder
java.lang.Object
org.springframework.data.mongodb.core.aggregation.RedactOperation.RedactOperationBuilder
- Enclosing class:
- RedactOperation
Builder to create new instance of
RedactOperation
.- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Define the outcome (anything that resolves to $$DESCEND, $$PRUNE, or $$KEEP) when the condition is not met.Return fields at the current document level and exclude embedded ones if the condition is not met.Return/Keep all fields at the current document/embedded level if the condition is not met.Exclude all fields at this current document/embedded level if the condition is not met.Define the outcome (anything that resolves to $$DESCEND, $$PRUNE, or $$KEEP) when the condition is met.Return fields at the current document level and exclude embedded ones if the condition is met.thenKeep()
Return/Keep all fields at the current document/embedded level if the condition is met.Exclude all fields at this current document/embedded level if the condition is met.when
(org.bson.Document condition) Specify the evaluation condition.when
(AggregationExpression condition) Specify the evaluation condition.when
(CriteriaDefinition criteria) Specify the evaluation condition.
-
Method Details
-
when
Specify the evaluation condition.- Parameters:
criteria
- must not be null.- Returns:
- this.
-
when
Specify the evaluation condition.- Parameters:
condition
- must not be null.- Returns:
- this.
-
when
Specify the evaluation condition.- Parameters:
condition
- must not be null.- Returns:
- this.
-
thenDescend
Return fields at the current document level and exclude embedded ones if the condition is met.- Returns:
- this.
-
thenKeep
Return/Keep all fields at the current document/embedded level if the condition is met.- Returns:
- this.
-
thenPrune
Exclude all fields at this current document/embedded level if the condition is met.- Returns:
- this.
-
then
Define the outcome (anything that resolves to $$DESCEND, $$PRUNE, or $$KEEP) when the condition is met.- Parameters:
then
- must not be null.- Returns:
- this.
-
otherwiseDescend
Return fields at the current document level and exclude embedded ones if the condition is not met.- Returns:
- this.
-
otherwiseKeep
Return/Keep all fields at the current document/embedded level if the condition is not met.- Returns:
- this.
-
otherwisePrune
Exclude all fields at this current document/embedded level if the condition is not met.- Returns:
- this.
-
otherwise
Define the outcome (anything that resolves to $$DESCEND, $$PRUNE, or $$KEEP) when the condition is not met.- Parameters:
otherwise
- must not be null.- Returns:
- this.
-
build
- Returns:
- new instance of
RedactOperation
.
-