Class PushOperator


  • @MorphiaInternal
    public class PushOperator
    extends UpdateOperator
    Defines the $push update operator
    Since:
    2.0
    Developer note.
    This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Method Detail

      • position

        public PushOperator position​(int position)
        Sets the position for the update
        Parameters:
        position - the position in the array for the update
        Returns:
        this
      • slice

        public PushOperator slice​(int slice)
        Sets the slice value for the update
        Parameters:
        slice - the slice value for the update
        Returns:
        this
      • sort

        public PushOperator sort​(int sort)
        Sets the sort value for the update
        Parameters:
        sort - the sort value for the update
        Returns:
        this
      • sort

        public PushOperator sort​(Sort value)
        Sets the sort value for the update
        Parameters:
        value - the sort criteria to add
        Returns:
        this
      • toTarget

        public OperationTarget toTarget​(dev.morphia.internal.PathTarget pathTarget)
        Description copied from class: UpdateOperator
        Creates the OperationTarget for serialization
        Overrides:
        toTarget in class UpdateOperator
        Parameters:
        pathTarget - the PathTarget
        Returns:
        the OperationTarget