From 59c745023d9518586be52dc2d3d152e0519b2ab4 Mon Sep 17 00:00:00 2001 From: Sean Sundberg Date: Mon, 3 Jun 2024 00:22:50 -0500 Subject: [PATCH] Adds ResultValue versions of where, and, or for QueryClause Signed-off-by: Sean Sundberg --- .../ibm/openpages/support/util/query/QueryClause.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/ibm/openpages/support/util/query/QueryClause.java b/src/main/java/com/ibm/openpages/support/util/query/QueryClause.java index 52d0527..5fddd99 100644 --- a/src/main/java/com/ibm/openpages/support/util/query/QueryClause.java +++ b/src/main/java/com/ibm/openpages/support/util/query/QueryClause.java @@ -5,10 +5,16 @@ public abstract class QueryClause { + public static QueryClause where(IObjectType type, ResultValue field, Operation operation, ResultValue value) { + return where(type, field, operation, value.value()); + } public static QueryClause where(IObjectType type, ResultValue field, Operation operation, Object value) { return new SimpleQueryClause(type, field, operation, value); } + public QueryClause and(IObjectType type, ResultValue field, Operation operation, ResultValue value) { + return and(type, field, operation, value.value()); + } public QueryClause and(IObjectType type, ResultValue field, Operation operation, Object value) { return and(new SimpleQueryClause(type, field, operation, value)); } @@ -25,6 +31,9 @@ public QueryClause and(QueryClause clause) { return new AndQueryClause(this, clause); } + public QueryClause or(IObjectType type, ResultValue field, Operation operation, ResultValue value) { + return or(type, field, operation, value.value()); + } public QueryClause or(IObjectType type, ResultValue field, Operation operation, Object value) { return or(new SimpleQueryClause(type, field, operation, value)); }