Class SortOrder

  • All Implemented Interfaces:
    Serializable, Comparable<SortOrder>

    public final class SortOrder
    extends CodeList<SortOrder>
    Captures the SortBy order, ASC or DESC.
    Since:
    GeoAPI 2.1
    Author:
    Jody Garnett (Refractions Research)
    See Also:
    , Serialized Form
    • Method Detail

      • toSQL

        public String toSQL()
        Returns the element name for this sorting order as a SQL "ASC" or "DESC" keyword.

        We have chosen to use the full names ASCENDING and DESCENDING for our code list. The original XML schema matches the SQL convention of ASC and DESC.

      • values

        public static SortOrder[] values()
        Returns the list of SortOrders.
        Returns:
        The list of codes declared in the current JVM.
      • family

        public SortOrder[] family()
        Returns the list of enumerations of the same kind than this enum.
        Specified by:
        family in class CodeList<SortOrder>
        Returns:
        The codes of the same kind than this code.
      • valueOf

        public static SortOrder valueOf​(String code)
        Returns the sort order that matches the given string, or returns a new one if none match it.
        Parameters:
        code - The name of the code to fetch or to create.
        Returns:
        A code matching the given name.