Class PushOptions

    • Constructor Summary

      Constructors 
      Constructor Description
      PushOptions()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean  o)  
      getPosition()
      Gets the position at which to add the pushed values in the array.
      getSlice()
      Gets the slice value, which is the limit on the number of array elements allowed.
      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.
      int hashCode()  
      PushOptions  position)
      Sets the position at which to add the pushed values in the array.
      PushOptions  slice)
      Sets the limit on the number of array elements allowed.
      PushOptions  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.
      toString()  
      • Methods inherited from class java.lang.

        , , , , , , ,
    • Constructor Detail

      • PushOptions

        public PushOptions()
    • Method Detail

      • getPosition

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

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

        @Nullable
        public  getSlice()
        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
        MongoDB documentation
      • slice

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

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

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

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

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

        public boolean equals​( o)
        Overrides:
         in class 
      • hashCode

        public int hashCode()
        Overrides:
         in class 
      • toString

        public  toString()
        Overrides:
         in class