mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-30 21:08:30 +08:00
added orderBy to CustomQueryable
added isAscending() to OrderSpecifier
This commit is contained in:
parent
3d918df73e
commit
1ec0bbbb2d
@ -15,6 +15,7 @@ import com.mysema.query.collections.ColQuery;
|
||||
import com.mysema.query.collections.IteratorSource;
|
||||
import com.mysema.query.collections.QueryIndexSupport;
|
||||
import com.mysema.query.grammar.JavaOps;
|
||||
import com.mysema.query.grammar.OrderSpecifier;
|
||||
import com.mysema.query.grammar.types.Expr;
|
||||
import com.mysema.query.util.Assert;
|
||||
|
||||
@ -51,16 +52,22 @@ public class CustomQueryable<SubType extends CustomQueryable<SubType>> extends P
|
||||
setProjectable(innerQuery);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public SubType from(Expr<?>... o) {
|
||||
innerQuery.from(o);
|
||||
return _this;
|
||||
}
|
||||
|
||||
|
||||
protected ColQuery getInnerQuery(){
|
||||
return innerQuery;
|
||||
}
|
||||
|
||||
|
||||
public SubType from(Expr<?>... o) {
|
||||
innerQuery.from(o);
|
||||
return _this;
|
||||
}
|
||||
|
||||
public SubType orderBy(OrderSpecifier<?>... o) {
|
||||
innerQuery.orderBy(o);
|
||||
return _this;
|
||||
}
|
||||
|
||||
public SubType where(Expr.EBoolean... o) {
|
||||
innerQuery.where(o);
|
||||
return _this;
|
||||
|
||||
@ -27,7 +27,11 @@ public class OrderSpecifier<A extends Comparable<? super A>> {
|
||||
public Order getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
|
||||
public boolean isAscending(){
|
||||
return order == Order.ASC;
|
||||
}
|
||||
|
||||
public Expr<A> getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user