Class Sorting

  • All Implemented Interfaces:

    public class Sorting
    extends java.lang.Object
    implements java.lang.Cloneable
    Specifies how a query is sorted by a list of fields with a sort order
    Arne Bergene Fossaa
    • Constructor Detail

      • Sorting

        public Sorting()
        Creates an empty sort spec
      • Sorting

        public Sorting​(java.lang.String sortSpec)
        Creates a sort spec from a string
    • Method Detail

      • fromString

        public static Sorting fromString​(java.lang.String sortSpec)
        Creates a new sorting from the given string and returns it, or returns null if the argument does not contain any sorting criteria (e.g it is null or the empty string)
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • fieldOrders

        public java.util.List<Sorting.FieldOrder> fieldOrders()
        Returns the field orders of this sort specification as list. This is never null but can be empty. This list can be modified to change this sort spec.
      • clone

        public Sorting clone()
        clone in class java.lang.Object
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        equals in class java.lang.Object
      • encode

        public int encode​(java.nio.ByteBuffer buffer)