SortParams

Defines a list of field names used to sort query results.

Extends: Array<SortField>

Description

The SortParams class allows you to define a list of field names used to sort query results. In addition, it allows you to specify the type of order as ascending or descending.

Constructors

Creates a new instance and initializes it with specified sort fields.

public SortParams(Iterable<SortField> fields)

  • fields: SortField[] - list of fields to sort by.

Examples

{
  FilterParams filter = FilterParams.fromTuples("type", "Type1");
  PagingParams paging = new PagingParams(0, 100);
  SortingParams sorting = new SortingParams(new SortField("create_time", true));
 
  myDataClient.getDataByFilter(filter, paging, sorting);
  }

See also