public class PushOptions extends Object
Updates.pushEach(String, java.util.List, PushOptions)
Constructor | Description |
---|---|
PushOptions() |
Modifier and Type | Method | Description |
---|---|---|
Integer |
getPosition() |
Gets the position at which to add the pushed values in the array.
|
Integer |
getSlice() |
Gets the slice value, which is the limit on the number of array elements allowed.
|
Integer |
getSort() |
Gets the sort direction for sorting array elements that are not documents.
|
Bson |
getSortDocument() |
Gets the sort direction for sorting array elements that are documents.
|
PushOptions |
position(Integer position) |
Sets the position at which to add the pushed values in the array.
|
PushOptions |
slice(Integer slice) |
Sets the limit on the number of array elements allowed.
|
PushOptions |
sort(Integer sort) |
Sets the sort direction for sorting array elements that are not documents.
|
PushOptions |
sortDocument(Bson sortDocument) |
Sets the sort direction for sorting array elements that are documents.
|
String |
toString() |
@Nullable public Integer getPosition()
public PushOptions position(@Nullable Integer position)
position
- the position@Nullable public Integer getSlice()
public PushOptions slice(@Nullable Integer slice)
slice
- the limit@Nullable public Integer getSort()
public PushOptions sort(@Nullable Integer sort)
sort
- the sort directionIllegalStateException
- if sortDocument property is already set@Nullable public Bson getSortDocument()
public PushOptions sortDocument(@Nullable Bson sortDocument)
sortDocument
- the sort documentIllegalStateException
- if sort property is already set