Package dev.morphia.query.updates
Class PushOperator
- java.lang.Object
-
- dev.morphia.query.updates.UpdateOperator
-
- dev.morphia.query.updates.PushOperator
-
@MorphiaInternal 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 PushOperatorposition(int position)Sets the position for the updatePushOperatorslice(int slice)Sets the slice value for the updatePushOperatorsort(int sort)Sets the sort value for the updatePushOperatorsort(Sort value)Sets the sort value for the updateOperationTargettoTarget(dev.morphia.internal.PathTarget pathTarget)Creates the OperationTarget for serialization
-
-
-
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(dev.morphia.internal.PathTarget pathTarget)
Description copied from class:UpdateOperatorCreates the OperationTarget for serialization- Overrides:
toTargetin classUpdateOperator- Parameters:
pathTarget- the PathTarget- Returns:
- the OperationTarget
-
-