Module spring.data.mongodb
Interface AddFieldsOperation.AddFieldsOperationBuilder.ValueAppender
- Enclosing class:
- AddFieldsOperation.AddFieldsOperationBuilder
public static interface AddFieldsOperation.AddFieldsOperationBuilder.ValueAppender
- Since:
- 3.0
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionDefine the value to assign as is.withValueOf(Object value) Define the value to assign.withValueOfExpression(String operation, Object... values) Adds a generic projection for the current field.
-
Method Details
-
withValue
Define the value to assign as is.- Parameters:
value- can be null.- Returns:
- new instance of
AddFieldsOperation.
-
withValueOf
Define the value to assign. PlainStringvalues are treated asfield references.- Parameters:
value- must not be null.- Returns:
- new instance of
AddFieldsOperation.
-
withValueOfExpression
AddFieldsOperation.AddFieldsOperationBuilder withValueOfExpression(String operation, Object... values) Adds a generic projection for the current field.- Parameters:
operation- the operation key, e.g.$add.values- the values to be set for the projection operation.- Returns:
- new instance of
AddFieldsOperation.
-