Class SortClause

java.lang.Object
org.alfresco.rest.search.SortClause

public class SortClause extends Object
Object representation of a single sort clause.
  "sort": [
     {
       "type": "FIELD",
       "field": "string",
       "ascending": false
     }
   ]
 
  • Constructor Details

    • SortClause

      public SortClause()
    • SortClause

      public SortClause(String type, String field, boolean ascending)
  • Method Details

    • getType

      public String getType()
    • getField

      public String getField()
    • isAscending

      public boolean isAscending()
    • setType

      public void setType(String type)
    • setField

      public void setField(String field)
    • setAscending

      public void setAscending(boolean ascending)
    • from

      public static SortClause from(String type, String fieldname, boolean ascending)
      Shortcut method for creating a sort clause.
      Parameters:
      type - the sort type (e.g. FIELD)
      fieldname - the field name.
      ascending - ascending (true) or descending (false).
      Returns:
      a new SortClause instance.