Package dev.morphia.query.updates
Class CurrentDateOperator
- java.lang.Object
-
- dev.morphia.query.updates.UpdateOperator
-
- dev.morphia.query.updates.CurrentDateOperator
-
public class CurrentDateOperator extends UpdateOperator
Defines the $currentDate operator- Since:
- 2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCurrentDateOperator.TypeSpecificationType type options when setting the current date
-
Constructor Summary
Constructors Modifier Constructor Description protectedCurrentDateOperator(String field)Creates an operator for a field
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperationTargettoTarget(dev.morphia.internal.PathTarget pathTarget)Creates the OperationTarget for serializationCurrentDateOperatortype(CurrentDateOperator.TypeSpecification type)Sets the type of value to set when updating the field
-
-
-
Constructor Detail
-
CurrentDateOperator
protected CurrentDateOperator(String field)
Creates an operator for a field- Parameters:
field- the field to update
-
-
Method Detail
-
toTarget
public OperationTarget toTarget(dev.morphia.internal.PathTarget pathTarget)
Description copied from class:UpdateOperatorCreates the OperationTarget for serialization- Overrides:
toTargetin classUpdateOperator- Parameters:
pathTarget- the PathTarget- Returns:
- the OperationTarget
-
type
public CurrentDateOperator type(CurrentDateOperator.TypeSpecification type)
Sets the type of value to set when updating the field- Parameters:
type- the type to use- Returns:
- this
-
-