Class SortItem

  • All Implemented Interfaces:
    Visitable

    @API(status=STABLE,
         since="1.0")
    public final class SortItem
    extends Object
    implements Visitable
    A sort item can be used in an ORDER BY clause and changes the order of the items being returned from a query.
    Since:
    1.0
    Author:
    Gerrit Meier, Michael J. Simons
    • Method Detail

      • ascending

        @NotNull
        @Contract(pure=true)
        public @NotNull SortItem ascending()
        Creates a new sort item from this instance, setting the sort direction to ascending.
        Returns:
        A new sort item.
      • descending

        @NotNull
        @Contract(pure=true)
        public @NotNull SortItem descending()
        Creates a new sort item from this instance, setting the sort direction to descending.
        Returns:
        A new sort item.
      • accept

        public void accept​(Visitor visitor)
        Description copied from interface: Visitable
        Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
        Specified by:
        accept in interface Visitable
        Parameters:
        visitor - the visitor to notify, must not be null.