Class CurrentDateOperator
- java.lang.Object
-
- dev.morphia.query.experimental.updates.UpdateOperator
-
- dev.morphia.query.experimental.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 class
CurrentDateOperator.TypeSpecification
Type type options when setting the current date
-
Constructor Summary
Constructors Modifier Constructor Description protected
CurrentDateOperator(String field)
Creates an operator for a field
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperationTarget
toTarget(PathTarget pathTarget)
Creates the OperationTarget for serializationCurrentDateOperator
type(CurrentDateOperator.TypeSpecification type)
Sets the type of value to set when updating the field-
Methods inherited from class dev.morphia.query.experimental.updates.UpdateOperator
field, operator, value, value
-
-
-
-
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(PathTarget pathTarget)
Description copied from class:UpdateOperator
Creates the OperationTarget for serialization- Overrides:
toTarget
in 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
-
-