diff options
author | James Moger <james.moger@gitblit.com> | 2016-04-05 12:27:55 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2016-04-05 12:27:55 -0400 |
commit | bb87e621eefd97872aa1a619d38c166b2f07db84 (patch) | |
tree | d7199be13f0015e218ae2ded4ebd8af11b955845 /src/main/java/com/iciql/UpdateColumnSet.java | |
parent | 98bb5dc01796728de5b18f84e19766276d12d1db (diff) | |
download | iciql-bb87e621eefd97872aa1a619d38c166b2f07db84.tar.gz iciql-bb87e621eefd97872aa1a619d38c166b2f07db84.zip |
Reformat project with default IntelliJ settings
Diffstat (limited to 'src/main/java/com/iciql/UpdateColumnSet.java')
-rw-r--r-- | src/main/java/com/iciql/UpdateColumnSet.java | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/src/main/java/com/iciql/UpdateColumnSet.java b/src/main/java/com/iciql/UpdateColumnSet.java index a961480..7ae74a0 100644 --- a/src/main/java/com/iciql/UpdateColumnSet.java +++ b/src/main/java/com/iciql/UpdateColumnSet.java @@ -19,45 +19,43 @@ package com.iciql; /** * This class represents "SET column = value" in an UPDATE statement. - * - * @param <T> - * the query type - * @param <A> - * the new value data type + * + * @param <T> the query type + * @param <A> the new value data type */ public class UpdateColumnSet<T, A> implements UpdateColumn { - private Query<T> query; - private A x; - private A y; - private boolean isParameter; - - UpdateColumnSet(Query<T> query, A x) { - this.query = query; - this.x = x; - } - - public Query<T> to(A y) { - query.addUpdateColumnDeclaration(this); - this.y = y; - return query; - } - - public Query<T> toParameter() { - query.addUpdateColumnDeclaration(this); - isParameter = true; - return query; - } - - public void appendSQL(SQLStatement stat) { - query.appendSQL(stat, null, x); - stat.appendSQL(" = "); - if (isParameter) { - query.appendSQL(stat, x, RuntimeParameter.PARAMETER); - } else { - query.appendSQL(stat, x, y); - } - } + private Query<T> query; + private A x; + private A y; + private boolean isParameter; + + UpdateColumnSet(Query<T> query, A x) { + this.query = query; + this.x = x; + } + + public Query<T> to(A y) { + query.addUpdateColumnDeclaration(this); + this.y = y; + return query; + } + + public Query<T> toParameter() { + query.addUpdateColumnDeclaration(this); + isParameter = true; + return query; + } + + public void appendSQL(SQLStatement stat) { + query.appendSQL(stat, null, x); + stat.appendSQL(" = "); + if (isParameter) { + query.appendSQL(stat, x, RuntimeParameter.PARAMETER); + } else { + query.appendSQL(stat, x, y); + } + } } |