Class SortInfo

java.lang.Object
org.nuxeo.ecm.core.api.SortInfo
All Implemented Interfaces:
Serializable

public class SortInfo extends Object implements Serializable
This class holds the details for sorting.
Author:
George Lefter
See Also:
  • Field Details

  • Constructor Details

    • SortInfo

      public SortInfo(String sortColumn, boolean sortAscending)
      Parameters:
      sortColumn - the column to sort by, in schema:field format
      sortAscending - whether to sort ascending or descending
  • Method Details

    • getSortAscending

      public boolean getSortAscending()
    • getSortColumn

      public String getSortColumn()
      Returns:
      the column to sort by, in schema:field format
    • setSortColumn

      public void setSortColumn(String sortColumn)
      Since:
      5.4.0
    • setSortAscending

      public void setSortAscending(boolean sortAscending)
      Since:
      5.4.0
    • equals

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

      public static Map<String,Serializable> asMap(SortInfo sortInfo)
      Returns a map for given sort info, or null if sort info is null.

      The map keys are SORT_COLUMN_NAME and SORT_ASCENDING_NAME.

      Since:
      5.4.0
    • asSortInfo

      public static SortInfo asSortInfo(Map<String,Serializable> map)
      Returns a sort info for given map, or null if map is null or does not contain both keys SORT_COLUMN_NAME and SORT_ASCENDING_NAME.
      Since:
      5.4.0
    • toString

      public String toString()
      Overrides:
      toString in class Object