public class PushOptions
extends java.lang.Object
Updates.pushEach(String, java.util.List, PushOptions)
Constructor and Description |
---|
PushOptions() |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getPosition()
Gets the position at which to add the pushed values in the array.
|
java.lang.Integer |
getSlice()
Gets the slice value, which is the limit on the number of array elements allowed.
|
java.lang.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(java.lang.Integer position)
Sets the position at which to add the pushed values in the array.
|
PushOptions |
slice(java.lang.Integer slice)
Sets the limit on the number of array elements allowed.
|
PushOptions |
sort(java.lang.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.
|
java.lang.String |
toString() |
public java.lang.Integer getPosition()
public PushOptions position(java.lang.Integer position)
position
- the positionpublic java.lang.Integer getSlice()
public PushOptions slice(java.lang.Integer slice)
slice
- the limitpublic java.lang.Integer getSort()
public PushOptions sort(java.lang.Integer sort)
sort
- the sort directionjava.lang.IllegalStateException
- if sortDocument property is already setpublic Bson getSortDocument()
public PushOptions sortDocument(Bson sortDocument)
sortDocument
- the sort documentjava.lang.IllegalStateException
- if sort property is already setpublic java.lang.String toString()
toString
in class java.lang.Object