Class SortSpec

java.lang.Object
com.emc.documentum.rest.sort.SortSpec

public class SortSpec extends Object
The sort specification for object attributes. A sort consists of multiple single sort specifications, separated by comma (','); each sort specification consists of an attribute to be sorted and its sort order, separated by ' '; sort order can be either "DESC" or "ASC", case insensitive; sort order is optional, if not specified, the default sort order is "ASC"; optionally it can be specified with non-repeating attributes; example: sort=r_modify_date desc,object_id asc,title.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final SortSpec
    The default sort specification without any specified attributes.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor without sort specification.
    SortSpec(String sortBy)
    Constructor with a specified sort specification.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    get()
    Return a list of SortOrder according to the sort specification
    int
     
    Return the original sort specification.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT

      public static final SortSpec DEFAULT
      The default sort specification without any specified attributes. When the default sort specification is used, the sort order is determined by the system.
  • Constructor Details

    • SortSpec

      public SortSpec()
      Constructor without sort specification.
    • SortSpec

      public SortSpec(String sortBy)
      Constructor with a specified sort specification.
      Parameters:
      sortBy - the sort expression
  • Method Details

    • get

      public List<SortOrder> get()
      Return a list of SortOrder according to the sort specification
      Returns:
      a list of SortOrder
    • toString

      public String toString()
      Return the original sort specification.
      Overrides:
      toString in class Object
      Returns:
      the original sort specification
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object