org.labkey.remoteapi.query

## Class Sort

- java.lang.Object
- - org.labkey.remoteapi.query.Sort

-     public class Sort
      extends java.lang.Object

  Represents a particular sort order entry, which consists of a column name and an optional direction

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Sort.Direction`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Sort(Sort source)`
    `Sort(java.lang.String columnName)`
    `Sort(java.lang.String columnName, Sort.Direction direction)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getColumnName()`
    `Sort.Direction` | `getDirection()`
    `static java.lang.String` | `getSortQueryStringParam(java.util.List<Sort> sorts)` Constructs the sort query string parameter from the current list of sort definitions.
    `void` | `setColumnName(java.lang.String columnName)`
    `void` | `setDirection(Sort.Direction direction)`
    `java.lang.String` | `toQueryStringParam()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Sort

          public Sort(java.lang.String columnName)

    - #### Sort

          public Sort(java.lang.String columnName,
                      Sort.Direction direction)

    - #### Sort

          public Sort(Sort source)

  - ### Method Detail

    - #### getColumnName

          public java.lang.String getColumnName()

    - #### setColumnName

          public void setColumnName(java.lang.String columnName)

    - #### getDirection

          public Sort.Direction getDirection()

    - #### setDirection

          public void setDirection(Sort.Direction direction)

    - #### getSortQueryStringParam

          public static java.lang.String getSortQueryStringParam(java.util.List<Sort> sorts)

      Constructs the sort query string parameter from the current list of sort definitions. The sort query string parameter is in the form of [-]column,[-]column,... where the optional - is used for a descending sort direction.
      Returns:
        The sort query string parameter.

    - #### toQueryStringParam

          public java.lang.String toQueryStringParam()

      Returns:
        a URL-style representation of this sort parameter. Column names are prefixed with "-" to represent a descending sort.