Package dev.morphia.query
Class PushOptions
java.lang.Object
dev.morphia.query.PushOptions
The options to apply to a $push update operator.
- Since:
- 1.3
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PushOptions
options()
Helper method to create a PushOptions instanceposition
(int position) Sets the position for the updateslice
(int slice) Sets the slice value for the updatesort
(int sort) Sets the sort value for the updateSets the sort value for the update
-
Constructor Details
-
PushOptions
public PushOptions()Creates an empty options class
-
-
Method Details
-
position
Sets the position for the update- Parameters:
position
- the position in the array for the update- Returns:
- this
-
slice
Sets the slice value for the update- Parameters:
slice
- the slice value for the update- Returns:
- this
-
sort
Sets the sort value for the update- Parameters:
sort
- the sort value for the update- Returns:
- this
-
sort
Sets the sort value for the update- Parameters:
field
- the field to sort bydirection
- the direction of the sort- Returns:
- this
-
options
Helper method to create a PushOptions instance- Returns:
- the new PushOptions instance
-