Class PushOperator
- java.lang.Object
-
- dev.morphia.query.experimental.updates.UpdateOperator
-
- dev.morphia.query.experimental.updates.PushOperator
-
public class PushOperator extends UpdateOperator
Defines the $push update operator- Since:
- 2.0
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PushOperator
position(int position)
Sets the position for the updatePushOperator
slice(int slice)
Sets the slice value for the updatePushOperator
sort(int sort)
Sets the sort value for the updatePushOperator
sort(Sort value)
Sets the sort value for the updateOperationTarget
toTarget(PathTarget pathTarget)
Creates the OperationTarget for serialization-
Methods inherited from class dev.morphia.query.experimental.updates.UpdateOperator
field, operator, value, value
-
-
-
-
Method Detail
-
position
public PushOperator position(int position)
Sets the position for the update- Parameters:
position
- the position in the array for the update- Returns:
- this
-
slice
public PushOperator slice(int slice)
Sets the slice value for the update- Parameters:
slice
- the slice value for the update- Returns:
- this
-
sort
public PushOperator sort(int sort)
Sets the sort value for the update- Parameters:
sort
- the sort value for the update- Returns:
- this
-
sort
public PushOperator sort(Sort value)
Sets the sort value for the update- Parameters:
value
- the sort criteria to add- Returns:
- this
-
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
-
-