2018-03-21 13:11:02 +01:00
|
|
|
package eu.eudat.data.query.definition;
|
2017-12-17 22:34:24 +01:00
|
|
|
|
2018-01-25 16:24:21 +01:00
|
|
|
|
2018-03-21 13:11:02 +01:00
|
|
|
import eu.eudat.data.dao.criteria.Criteria;
|
|
|
|
import eu.eudat.data.query.definition.helpers.ColumnOrderings;
|
|
|
|
import eu.eudat.data.query.definition.helpers.SelectionFields;
|
|
|
|
import eu.eudat.queryable.QueryableList;
|
|
|
|
import eu.eudat.queryable.queryableentity.DataEntity;
|
|
|
|
|
|
|
|
|
2018-03-21 14:15:06 +01:00
|
|
|
public abstract class TableQuery<C extends Criteria<T>, T extends DataEntity<T, K>, K> extends Query<C, T> implements TableCriteriaQuery<C, T> {
|
2018-01-25 16:24:21 +01:00
|
|
|
private ColumnOrderings orderings;
|
2018-02-01 08:47:24 +01:00
|
|
|
private SelectionFields selection;
|
2017-12-17 22:34:24 +01:00
|
|
|
private Integer length;
|
|
|
|
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
|
|
|
}
|