## org.opengis.filter.sort
Class SortOrder

    Object
      CodeList<SortOrder>
          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
See Also:
  , Serialized Form

Field Summary
`static SortOrder` `ASCENDING` Represents acending order.
`static SortOrder` `DESCENDING` Represents descending order.

Method Summary
`CodeList[]` `family()` Returns the list of enumerations of the same kind than this enum.
`String` `toSQL()` Returns the element name for this sorting order as a SQL `"ASC"` or `"DESC"` keyword.
`static SortOrder` `valueOf(String code)` Returns the SortOrder that matches the given string, or returns a new one if none match it.
`static SortOrder[]` `values()` Returns the list of `SortOrder`s.

Methods inherited from class CodeList
`compareTo, name, ordinal, readResolve, toString`

Methods inherited from class Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ASCENDING

    @UML(identifier="ASC",
         obligation=CONDITIONAL,
         specification=OGC_02059)
    public static final SortOrder ASCENDING

  Represents acending order.

  Note this has the string representation of `"ASC"` to agree with the Filter 1.1 specification.

### DESCENDING

    @UML(identifier="DESC",
         obligation=CONDITIONAL,
         specification=OGC_02059)
    public static final SortOrder DESCENDING

  Represents descending order.

  Note this has the string representation of `"DESC"` to agree with the Filter 1.1 specification.

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 `SortOrder`s.

### family

    public CodeList[] family()

  Returns the list of enumerations of the same kind than this enum.

  Specified by:
    `family` in class `CodeList<SortOrder>`

### valueOf

    public static SortOrder valueOf(String code)

  Returns the SortOrder that matches the given string, or returns a new one if none match it.

Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.