
com.groupbyinc.api.request.Sort Maven / Gradle / Ivy
package com.groupbyinc.api.request;
import com.groupbyinc.common.jackson.annotation.JsonInclude;
/**
*
* Object that specifies sort field and direction
*
* Created by groupby on 11/11/14.
*/
public class Sort {
public enum Order {
Ascending,
Descending
}
private String field;
@JsonInclude(JsonInclude.Include.NON_DEFAULT) private Order order = Sort.Order.Ascending;
public String getField() {
return field;
}
/**
*
* @param field The source field name to sort by.
* @return
*/
public Sort setField(String field) {
this.field = field;
return this;
}
/**
*
* @return The order Ascending or Descending
*/
public Order getOrder() {
return order;
}
/**
*
* Order in which the field will be applied. Takes either
* `Ascending` or `Descending`
*
* @param order
* @return
*/
public Sort setOrder(Order order) {
this.order = order;
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy