Module spring.data.mongodb
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
ConstructorsConstructorDescriptionUnsetOperation(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.DocumenttoDocument(AggregationOperationContext context) static UnsetOperationCreate new instance ofUnsetOperation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.mongodb.core.aggregation.AggregationOperation
toPipelineStagesMethods 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:FieldsExposingAggregationOperationReturns the fields exposed by theAggregationOperation.- Specified by:
getFieldsin interfaceFieldsExposingAggregationOperation- Returns:
- will never be null.
-
toDocument
Description copied from interface:AggregationOperation- Specified by:
toDocumentin interfaceAggregationOperation- Parameters:
context- theAggregationOperationContextto operate within. Must not be null.- Returns:
- the Document
-
getOperator
Description copied from interface:AggregationOperationReturn the MongoDB operator that is used for thisAggregationOperation. Aggregation operations should implement this method to avoid document rendering.- Specified by:
getOperatorin interfaceAggregationOperation- Returns:
- the operator used for this
AggregationOperation.
-