public class PushOptions extends Object
Updates.pushEach(String, java.util.List, PushOptions)
Constructor and Description |
---|
PushOptions() |
Modifier and Type | Method and 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() |
public Integer getPosition()
public PushOptions position(Integer position)
position
- the positionpublic Integer getSlice()
public PushOptions slice(Integer slice)
slice
- the limitpublic Integer getSort()
public PushOptions sort(Integer sort)
sort
- the sort directionIllegalStateException
- if sortDocument property is already setpublic Bson getSortDocument()
public PushOptions sortDocument(Bson sortDocument)
sortDocument
- the sort documentIllegalStateException
- if sort property is already set