Class UnsetOperation
java.lang.Object
org.springframework.data.mongodb.core.aggregation.UnsetOperation
- All Implemented Interfaces:
AggregationOperation
,FieldsExposingAggregationOperation
,FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
public class UnsetOperation
extends Object
implements FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
Removes fields from documents.
- Since:
- 3.0
- Author:
- Christoph Strobl
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.aggregation.FieldsExposingAggregationOperation
FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
-
Constructor Summary
ConstructorDescriptionUnsetOperation
(Collection<Object> fields) Create new instance ofUnsetOperation
. -
Method Summary
Modifier and TypeMethodDescriptionAlso unset the given fields.Also unset the given fields.Returns the fields exposed by theAggregationOperation
.Return the MongoDB operator that is used for thisAggregationOperation
.org.bson.Document
toDocument
(AggregationOperationContext context) static UnsetOperation
Create new instance ofUnsetOperation
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.mongodb.core.aggregation.AggregationOperation
toPipelineStages
Methods inherited from interface org.springframework.data.mongodb.core.aggregation.FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
inheritsFields
-
Constructor Details
-
UnsetOperation
Create new instance ofUnsetOperation
.- Parameters:
fields
- must not be null.
-
-
Method Details
-
unset
Create new instance ofUnsetOperation
.- Parameters:
fields
- must not be null.- Returns:
- new instance of
UnsetOperation
.
-
and
Also unset the given fields.- Parameters:
fields
- must not be null.- Returns:
- new instance of
UnsetOperation
.
-
and
Also unset the given fields.- Parameters:
fields
- must not be null.- Returns:
- new instance of
UnsetOperation
.
-
getFields
Description copied from interface:FieldsExposingAggregationOperation
Returns the fields exposed by theAggregationOperation
.- Specified by:
getFields
in interfaceFieldsExposingAggregationOperation
- Returns:
- will never be null.
-
toDocument
Description copied from interface:AggregationOperation
- Specified by:
toDocument
in interfaceAggregationOperation
- Parameters:
context
- theAggregationOperationContext
to operate within. Must not be null.- Returns:
- the Document
-
getOperator
Description copied from interface:AggregationOperation
Return the MongoDB operator that is used for thisAggregationOperation
. Aggregation operations should implement this method to avoid document rendering.- Specified by:
getOperator
in interfaceAggregationOperation
- Returns:
- the operator used for this
AggregationOperation
.
-