diff options
Diffstat (limited to 'src/com/iciql/QueryWhere.java')
-rw-r--r-- | src/com/iciql/QueryWhere.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/iciql/QueryWhere.java b/src/com/iciql/QueryWhere.java index 0a07c40..7503ea1 100644 --- a/src/com/iciql/QueryWhere.java +++ b/src/com/iciql/QueryWhere.java @@ -130,6 +130,7 @@ public class QueryWhere<T> { * @return a query condition to continue building the condition
*/
public <A> QueryCondition<T, A> and(A x) {
+ query.getFrom().getAliasDefinition().checkMultipleEnums(x);
query.addConditionToken(ConditionAndOr.AND);
return new QueryCondition<T, A>(query, x);
}
@@ -220,6 +221,7 @@ public class QueryWhere<T> { * @return a query condition to continue building the condition
*/
public <A> QueryCondition<T, A> or(A x) {
+ query.getFrom().getAliasDefinition().checkMultipleEnums(x);
query.addConditionToken(ConditionAndOr.OR);
return new QueryCondition<T, A>(query, x);
}
@@ -377,6 +379,7 @@ public class QueryWhere<T> { }
public QueryWhere<T> orderBy(Object field) {
+ query.getFrom().getAliasDefinition().checkMultipleEnums(field);
query.orderBy(field);
return this;
}
@@ -395,30 +398,35 @@ public class QueryWhere<T> { }
public QueryWhere<T> orderByNullsFirst(Object expr) {
+ query.getFrom().getAliasDefinition().checkMultipleEnums(expr);
OrderExpression<T> e = new OrderExpression<T>(query, expr, false, true, false);
query.addOrderBy(e);
return this;
}
public QueryWhere<T> orderByNullsLast(Object expr) {
+ query.getFrom().getAliasDefinition().checkMultipleEnums(expr);
OrderExpression<T> e = new OrderExpression<T>(query, expr, false, false, true);
query.addOrderBy(e);
return this;
}
public QueryWhere<T> orderByDesc(Object expr) {
+ query.getFrom().getAliasDefinition().checkMultipleEnums(expr);
OrderExpression<T> e = new OrderExpression<T>(query, expr, true, false, false);
query.addOrderBy(e);
return this;
}
public QueryWhere<T> orderByDescNullsFirst(Object expr) {
+ query.getFrom().getAliasDefinition().checkMultipleEnums(expr);
OrderExpression<T> e = new OrderExpression<T>(query, expr, true, true, false);
query.addOrderBy(e);
return this;
}
public QueryWhere<T> orderByDescNullsLast(Object expr) {
+ query.getFrom().getAliasDefinition().checkMultipleEnums(expr);
OrderExpression<T> e = new OrderExpression<T>(query, expr, true, false, true);
query.addOrderBy(e);
return this;
|