#2663 - No effective change - Tidy Query interface with default methods

This commit is contained in:
Rob Bygrave committed 2022-04-20 21:49:06 +12:00
1 parent 76b02ff56a
commit 4d21fbfcf8
3 files changed
+21 -44

No files matched your search

@@ -432,26 +432,11 @@ final class DefaultFetchGroupQuery<T> implements SpiFetchGroupQuery<T>, SpiQuery
throw new RuntimeException("EB102: Only select() and fetch() clause is allowed on FetchGroup");
}
@Override
public Query<T> order(String orderByClause) {
throw new RuntimeException("EB102: Only select() and fetch() clause is allowed on FetchGroup");
}
@Override
public OrderBy<T> order() {
throw new RuntimeException("EB102: Only select() and fetch() clause is allowed on FetchGroup");
}
@Override
public OrderBy<T> orderBy() {
throw new RuntimeException("EB102: Only select() and fetch() clause is allowed on FetchGroup");
}
@Override
public Query<T> setOrder(OrderBy<T> orderBy) {
throw new RuntimeException("EB102: Only select() and fetch() clause is allowed on FetchGroup");
}
@Override
public Query<T> setOrderBy(OrderBy<T> orderBy) {
throw new RuntimeException("EB102: Only select() and fetch() clause is allowed on FetchGroup");
@@ -1614,11 +1614,6 @@ public final class DefaultOrmQuery<T> extends AbstractQuery implements SpiQuery<
@Override
public OrderBy<T> orderBy() {
return order();
}
@Override
public OrderBy<T> order() {
if (orderBy == null) {
orderBy = new OrderBy<>(this, null);
}
@@ -1627,11 +1622,6 @@ public final class DefaultOrmQuery<T> extends AbstractQuery implements SpiQuery<
@Override
public Query<T> orderBy(String orderByClause) {
return order(orderByClause);
}
@Override
public Query<T> order(String orderByClause) {
if (orderByClause == null || orderByClause.trim().isEmpty()) {
this.orderBy = null;
} else {
@@ -1642,11 +1632,6 @@ public final class DefaultOrmQuery<T> extends AbstractQuery implements SpiQuery<
@Override
public Query<T> setOrderBy(OrderBy<T> orderBy) {
return setOrder(orderBy);
}
@Override
public Query<T> setOrder(OrderBy<T> orderBy) {
this.orderBy = orderBy;
if (orderBy != null) {
orderBy.setQuery(this);