Class PushOptions

java.lang.Object
com.mongodb.client.model.PushOptions

@Deprecated(since="2021-05-27") public class PushOptions extends Object
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
The options to apply to a $push update operator.
Since:
3.1
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated.
     
    Deprecated.
    Gets the position at which to add the pushed values in the array.
    Deprecated.
    Gets the slice value, which is the limit on the number of array elements allowed.
    Deprecated.
    Gets the sort direction for sorting array elements that are not documents.
    Deprecated.
    Gets the sort direction for sorting array elements that are documents.
    int
    Deprecated.
     
    position(Integer position)
    Deprecated.
    Sets the position at which to add the pushed values in the array.
    slice(Integer slice)
    Deprecated.
    Sets the limit on the number of array elements allowed.
    sort(Integer sort)
    Deprecated.
    Sets the sort direction for sorting array elements that are not documents.
    sortDocument(Bson sortDocument)
    Deprecated.
    Sets the sort direction for sorting array elements that are documents.
    Deprecated.
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PushOptions

      public PushOptions()
      Deprecated.
  • Method Details

    • getPosition

      @Nullable public Integer getPosition()
      Deprecated.
      Gets the position at which to add the pushed values in the array.
      Returns:
      the position, which may be null
    • position

      public PushOptions position(@Nullable Integer position)
      Deprecated.
      Sets the position at which to add the pushed values in the array.
      Parameters:
      position - the position
      Returns:
      this
    • getSlice

      @Nullable public Integer getSlice()
      Deprecated.
      Gets the slice value, which is the limit on the number of array elements allowed.
      Returns:
      the slice value representing the limit on the number of array elements allowed
    • slice

      public PushOptions slice(@Nullable Integer slice)
      Deprecated.
      Sets the limit on the number of array elements allowed.
      Parameters:
      slice - the limit
      Returns:
      this
    • getSort

      @Nullable public Integer getSort()
      Deprecated.
      Gets the sort direction for sorting array elements that are not documents.
      Returns:
      the sort direction
    • sort

      public PushOptions sort(@Nullable Integer sort)
      Deprecated.
      Sets the sort direction for sorting array elements that are not documents.
      Parameters:
      sort - the sort direction
      Returns:
      this
      Throws:
      IllegalStateException - if sortDocument property is already set
    • getSortDocument

      @Nullable public Bson getSortDocument()
      Deprecated.
      Gets the sort direction for sorting array elements that are documents.
      Returns:
      the sort document
    • sortDocument

      public PushOptions sortDocument(@Nullable Bson sortDocument)
      Deprecated.
      Sets the sort direction for sorting array elements that are documents.
      Parameters:
      sortDocument - the sort document
      Returns:
      this
      Throws:
      IllegalStateException - if sort property is already set
    • equals

      public boolean equals(Object o)
      Deprecated.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object