Class SortField

java.lang.Object
org.pipservices3.commons.data.SortField

public class SortField extends Object
Defines a field name and order used to sort query results.

### Example ###

 
 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:
  • Constructor Details

    • SortField

      public SortField()
    • SortField

      public SortField(String name, boolean ascending)
      Creates a new instance and assigns its values.
      Parameters:
      name - the name of the field to sort by.
      ascending - true to sort in ascending order, and false to sort in descending order.
    • SortField

      public SortField(String name)
  • Method Details

    • getName

      public String getName()
    • setName

      public void setName(String value)
    • isAscending

      public boolean isAscending()
    • setAscending

      public void setAscending(boolean value)