You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2014/10/22 00:51:37 UTC

svn commit: r1633479 - /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/WhereClauseExpression.java

Author: tfischer
Date: Tue Oct 21 22:51:37 2014
New Revision: 1633479

URL: http://svn.apache.org/r1633479
Log:
use final where possible

Modified:
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/WhereClauseExpression.java

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/WhereClauseExpression.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/WhereClauseExpression.java?rev=1633479&r1=1633478&r2=1633479&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/WhereClauseExpression.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/WhereClauseExpression.java Tue Oct 21 22:51:37 2014
@@ -48,13 +48,13 @@ public class WhereClauseExpression
     private Object rValue;
 
     /** A verbatim SQL for this Criterion. */
-    private String sql;
+    private final String sql;
 
     /**
      * Replacements for the placeholders in the verbatim SQL.
      * Is only used if sql is not null.
      */
-    private Object[] preparedStatementReplacements;
+    private final Object[] preparedStatementReplacements;
 
     /**
      * Constructor.
@@ -71,11 +71,11 @@ public class WhereClauseExpression
      *        in the verbatim sql condition.
      */
     public WhereClauseExpression(
-            Object lValue,
-            SqlEnum operator,
-            Object rValue,
-            String sql,
-            Object[] preparedStatementReplacements)
+            final Object lValue,
+            final SqlEnum operator,
+            final Object rValue,
+            final String sql,
+            final Object[] preparedStatementReplacements)
     {
         if (operator != null
                 && (sql != null || preparedStatementReplacements != null))
@@ -117,7 +117,7 @@ public class WhereClauseExpression
      *
      * @throws IllegalArgumentException if lValue is null or empty.
      */
-    public void setLValue(String lValue)
+    public void setLValue(final Object lValue)
     {
         this.lValue = lValue;
     }
@@ -138,7 +138,7 @@ public class WhereClauseExpression
      *
      * @param operator the value to set, or null fo no operator.
      */
-    public void setOperator(SqlEnum operator)
+    public void setOperator(final SqlEnum operator)
     {
         this.operator = operator;
     }
@@ -160,7 +160,7 @@ public class WhereClauseExpression
      *
      * @param rValue the value to set, or null for the empty String.
      */
-    public void setRValue(Object rValue)
+    public void setRValue(final Object rValue)
     {
         this.rValue = rValue;
     }
@@ -209,7 +209,7 @@ public class WhereClauseExpression
     }
 
     @Override
-    public boolean equals(Object obj)
+    public boolean equals(final Object obj)
     {
         if (this == obj)
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org