2024-02-09 12:24:23 +01:00
|
|
|
package eu.eudat.controllers.publicapi.query.definition;
|
2017-12-17 22:34:24 +01:00
|
|
|
|
2024-02-09 12:24:23 +01:00
|
|
|
import eu.eudat.controllers.publicapi.QueryableList;
|
|
|
|
import eu.eudat.controllers.publicapi.criteria.Criteria;
|
|
|
|
import eu.eudat.controllers.publicapi.query.definition.helpers.ColumnOrderings;
|
|
|
|
import eu.eudat.controllers.publicapi.query.definition.helpers.SelectionFields;
|
2022-10-18 08:39:46 +02:00
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
2018-03-21 13:11:02 +01:00
|
|
|
|
|
|
|
|
2024-02-01 16:29:04 +01:00
|
|
|
public abstract class TableQuery<C extends Criteria<T>, T, K> extends Query<C, T> implements TableCriteriaQuery<C, T> {
|
2018-01-25 16:24:21 +01:00
|
|
|
private ColumnOrderings orderings;
|
2022-10-18 08:39:46 +02:00
|
|
|
@ApiModelProperty(hidden = true)
|
2018-02-01 08:47:24 +01:00
|
|
|
private SelectionFields selection;
|
2022-10-18 08:39:46 +02:00
|
|
|
@ApiModelProperty(value = "length", name = "length", dataType = "Integer", example = "2")
|
2017-12-17 22:34:24 +01:00
|
|
|
private Integer length;
|
2022-10-18 08:39:46 +02:00
|
|
|
@ApiModelProperty(value = "offset", name = "offset", dataType = "Integer", example = "0")
|
2017-12-17 22:34:24 +01:00
|
|
|
private Integer offset;
|
|
|
|
|
|
|
|
public Integer getLength() {
|
|
|
|
return length;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setLength(Integer length) {
|
|
|
|
this.length = length;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Integer getOffset() {
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setOffset(Integer offset) {
|
|
|
|
this.offset = offset;
|
|
|
|
}
|
2018-01-25 16:24:21 +01:00
|
|
|
|
|
|
|
public ColumnOrderings getOrderings() {
|
|
|
|
return orderings;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setOrderings(ColumnOrderings orderings) {
|
|
|
|
this.orderings = orderings;
|
|
|
|
}
|
2018-02-01 08:47:24 +01:00
|
|
|
|
|
|
|
public SelectionFields getSelection() {
|
|
|
|
return selection;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSelection(SelectionFields selection) {
|
|
|
|
this.selection = selection;
|
|
|
|
}
|
2018-03-21 13:11:02 +01:00
|
|
|
|
|
|
|
@Override
|
2018-05-28 11:50:42 +02:00
|
|
|
public QueryableList<T> collect() {
|
2018-03-21 13:11:02 +01:00
|
|
|
return this.applyPaging(super.collect());
|
|
|
|
}
|
2018-03-21 14:15:06 +01:00
|
|
|
|
|
|
|
@Override
|
2018-05-28 11:50:42 +02:00
|
|
|
public QueryableList<T> collect(QueryableList<T> repo) {
|
2018-03-21 14:15:06 +01:00
|
|
|
return this.applyPaging(super.collect(repo));
|
|
|
|
}
|
2017-12-17 22:34:24 +01:00
|
|
|
}
|