Deprecate order() methods on Query, ExpressionList - migrate to orderBy()

Unfortunately we have order() and orderBy() methods which do the
same thing. I have decided to deprecate the order() ones in
favour of the orderBy() methods so that ultimately we will end
up with less methods and I think orderBy() is the correct choice.

Apologies for the migration pain here.
This commit is contained in:
Rob Bygrave
2023-06-01 21:21:39 +12:00
parent 6a2d0c233a
commit e71be4e1b1
6 changed files with 25 additions and 82 deletions
@@ -290,25 +290,14 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
return query.where();
}
@Override
public OrderBy<T> order() {
return query.order();
}
@Override
public OrderBy<T> orderBy() {
return query.order();
}
@Override
public ExpressionList<T> order(String orderByClause) {
query.order(orderByClause);
return this;
return query.orderBy();
}
@Override
public ExpressionList<T> orderBy(String orderBy) {
query.order(orderBy);
query.orderBy(orderBy);
return this;
}
@@ -131,8 +131,8 @@ public final class FilterExpressionList<T> extends DefaultExpressionList<T> {
}
@Override
public OrderBy<T> order() {
return rootQuery.order();
public OrderBy<T> orderBy() {
return rootQuery.orderBy();
}
@Override
@@ -141,12 +141,6 @@ public final class FilterExpressionList<T> extends DefaultExpressionList<T> {
return this;
}
@Override
public ExpressionList<T> order(String orderByClause) {
this.orderByClause = orderByClause;
return this;
}
@Override
public ExpressionList<T> setMaxRows(int maxRows) {
this.maxRows = maxRows;
@@ -895,16 +895,6 @@ final class JunctionExpression<T> implements SpiJunction<T>, SpiExpression, Expr
return exprList.or(expOne, expTwo);
}
@Override
public OrderBy<T> order() {
return exprList.order();
}
@Override
public ExpressionList<T> order(String orderByClause) {
return exprList.order(orderByClause);
}
@Override
public OrderBy<T> orderBy() {
return exprList.orderBy();