Skip to content

Commit 36b7d8c

Browse files
committed
Add constructor (rather than factory method) for Condition.Builder.
1 parent 8387271 commit 36b7d8c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

query-engine/docs/query-engine-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ services:
5959
- 14268:14268
6060

6161
query-engine:
62-
image: ghcr.io/yaytay/query-engine-design-mode:0.0.39-2-main
62+
image: ghcr.io/yaytay/query-engine-design-mode:0.0.39-3-main
6363
ports:
6464
- 2000:8080
6565
volumes:

query-engine/src/main/java/uk/co/spudsoft/query/defn/Condition.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,15 @@ public static class Builder {
222222

223223
private Builder() {
224224
}
225+
226+
/**
227+
* Construct the builder with an initial expression.
228+
* This enables shortcutting of condition values, primarily for parameters.
229+
* @param expression the JEXL expression.
230+
*/
231+
public Builder(String expression) {
232+
this.expression = expression;
233+
}
225234

226235
/**
227236
* Set the expression of the Condition in the builder.
@@ -250,13 +259,4 @@ public static Condition.Builder builder() {
250259
return new Condition.Builder();
251260
}
252261

253-
/**
254-
* Construct a new Builder object with an expression.
255-
* @param expression The expression.
256-
* @return a new Builder object with an expression.
257-
*/
258-
public static Condition.Builder builder(String expression) {
259-
return new Condition.Builder().expression(expression);
260-
}
261-
262262
}

query-engine/src/main/java/uk/co/spudsoft/query/main/Version.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public final class Version {
3434
/**
3535
* The project version, as set in the Maven pom.xml.
3636
*/
37-
public static final String MAVEN_PROJECT_VERSION = "0.0.39-2-main";
37+
public static final String MAVEN_PROJECT_VERSION = "0.0.39-3-main";
3838

3939
private Version() {
4040
}

0 commit comments

Comments
 (0)