2018-03-21 13:11:02 +01:00
|
|
|
package eu.eudat.data.query.definition.helpers;
|
2018-01-25 16:24:21 +01:00
|
|
|
|
2018-02-01 10:08:06 +01:00
|
|
|
|
2018-01-25 16:24:21 +01:00
|
|
|
public class Ordering {
|
|
|
|
public enum OrderByType {
|
|
|
|
ASC, DESC
|
|
|
|
}
|
|
|
|
|
2018-02-02 16:24:06 +01:00
|
|
|
public enum ColumnType {
|
2018-02-16 11:34:02 +01:00
|
|
|
COUNT, COLUMN, JOIN_COLUMN
|
2018-02-02 16:24:06 +01:00
|
|
|
}
|
|
|
|
|
2018-01-25 16:24:21 +01:00
|
|
|
private String fieldName;
|
2018-02-02 16:24:06 +01:00
|
|
|
private OrderByType orderByType;
|
|
|
|
private ColumnType columnType;
|
2018-01-25 16:24:21 +01:00
|
|
|
|
2018-02-02 16:24:06 +01:00
|
|
|
public Ordering(String fieldName) {
|
2018-01-25 16:24:21 +01:00
|
|
|
this.fieldName = fieldName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getFieldName() {
|
|
|
|
return fieldName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setFieldName(String fieldName) {
|
|
|
|
this.fieldName = fieldName;
|
|
|
|
}
|
|
|
|
|
2018-02-02 16:24:06 +01:00
|
|
|
public OrderByType getOrderByType() {
|
|
|
|
return orderByType;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setOrderByType(OrderByType orderByType) {
|
|
|
|
this.orderByType = orderByType;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Ordering fieldName(String fieldName) {
|
|
|
|
this.fieldName = fieldName;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Ordering orderByType(OrderByType orderByType) {
|
|
|
|
this.orderByType = orderByType;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public ColumnType getColumnType() {
|
|
|
|
return columnType;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setColumnType(ColumnType columnType) {
|
|
|
|
this.columnType = columnType;
|
2018-01-25 16:24:21 +01:00
|
|
|
}
|
|
|
|
|
2018-02-02 16:24:06 +01:00
|
|
|
public Ordering columnType(ColumnType columnType) {
|
|
|
|
this.columnType = columnType;
|
|
|
|
return this;
|
2018-01-25 16:24:21 +01:00
|
|
|
}
|
|
|
|
}
|