db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1377555 - /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/
Date Mon, 27 Aug 2012 02:52:29 GMT
Author: tfischer
Date: Mon Aug 27 02:52:28 2012
New Revision: 1377555

URL: http://svn.apache.org/viewvc?rev=1377555&view=rev
Log:
access ObjectOrColumnPsPartBuilder via getter, not as field

Modified:
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/AbstractWhereClausePsPartBuilder.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/CurrentDateTimePsPartBuilder.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/InBuilder.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/LikeBuilder.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/NullValueBuilder.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/StandardBuilder.java

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/AbstractWhereClausePsPartBuilder.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/AbstractWhereClausePsPartBuilder.java?rev=1377555&r1=1377554&r2=1377555&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/AbstractWhereClausePsPartBuilder.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/AbstractWhereClausePsPartBuilder.java
Mon Aug 27 02:52:28 2012
@@ -31,10 +31,20 @@ public abstract class AbstractWhereClaus
         implements WhereClausePsPartBuilder
 {
     /** The ObjectPsPartBuilder to use for single values or columns. */
-    protected static ObjectPsPartBuilder objectOrColumnPsPartBuilder
+    private static ObjectPsPartBuilder objectOrColumnPsPartBuilder
             = new ObjectOrColumnPsPartBuilder();
 
     /**
+     * Returns the ObjectPsPartBuilder to use for single values or columns.
+     *
+     * @return the ObjectPsPartBuilder to use.
+     */
+    public static ObjectPsPartBuilder getObjectOrColumnPsPartBuilder()
+    {
+        return objectOrColumnPsPartBuilder;
+    }
+
+    /**
      * Set the ObjectPsPartBuilder to use for single values or columns.
      *
      * @param builder the new ObjectPsPartBuilder to use.

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/CurrentDateTimePsPartBuilder.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/CurrentDateTimePsPartBuilder.java?rev=1377555&r1=1377554&r2=1377555&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/CurrentDateTimePsPartBuilder.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/CurrentDateTimePsPartBuilder.java
Mon Aug 27 02:52:28 2012
@@ -44,12 +44,12 @@ public class CurrentDateTimePsPartBuilde
         throws TorqueException
     {
         PreparedStatementPart result
-            = objectOrColumnPsPartBuilder.buildPs(
+            = getObjectOrColumnPsPartBuilder().buildPs(
                     whereClauseExpression.getLValue(),
                     ignoreCase,
                     adapter);
         result.getSql().append(whereClauseExpression.getOperator());
-        result .append(objectOrColumnPsPartBuilder.buildPs(
+        result .append(getObjectOrColumnPsPartBuilder().buildPs(
                 whereClauseExpression.getRValue(),
                 ignoreCase,
                 adapter));

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/InBuilder.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/InBuilder.java?rev=1377555&r1=1377554&r2=1377555&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/InBuilder.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/InBuilder.java
Mon Aug 27 02:52:28 2012
@@ -119,7 +119,7 @@ public class InBuilder extends AbstractW
             result.getSql().append('(');
         }
 
-        result.append(objectOrColumnPsPartBuilder.buildPs(
+        result.append(getObjectOrColumnPsPartBuilder().buildPs(
                 whereClausePart.getLValue(),
                 ignoreCaseApplied,
                 adapter));
@@ -133,7 +133,7 @@ public class InBuilder extends AbstractW
             if (whereClausePart.getOperator() == SqlEnum.IN)
             {
                 result.getSql().append(Criterion.OR);
-                result.append(objectOrColumnPsPartBuilder.buildPs(
+                result.append(getObjectOrColumnPsPartBuilder().buildPs(
                         whereClausePart.getLValue(),
                         false,
                         adapter));
@@ -142,7 +142,7 @@ public class InBuilder extends AbstractW
             else if (whereClausePart.getOperator() == SqlEnum.NOT_IN)
             {
                 result.getSql().append(Criterion.AND);
-                result.append(objectOrColumnPsPartBuilder.buildPs(
+                result.append(getObjectOrColumnPsPartBuilder().buildPs(
                         whereClausePart.getLValue(),
                         false,
                         adapter));

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/LikeBuilder.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/LikeBuilder.java?rev=1377555&r1=1377554&r2=1377555&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/LikeBuilder.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/LikeBuilder.java
Mon Aug 27 02:52:28 2012
@@ -135,7 +135,7 @@ public class LikeBuilder extends Abstrac
                 {
                     whereClausePart.setOperator(SqlEnum.NOT_ILIKE);
                 }
-                result = objectOrColumnPsPartBuilder.buildPs(
+                result = getObjectOrColumnPsPartBuilder().buildPs(
                         whereClausePart.getLValue(), false, adapter);
             }
             else
@@ -143,13 +143,13 @@ public class LikeBuilder extends Abstrac
                 // no native case insensitive like is offered by the DB,
                 // or the LIKE was replaced with equals.
                 // need to ignore case manually.
-                result = objectOrColumnPsPartBuilder.buildPs(
+                result = getObjectOrColumnPsPartBuilder().buildPs(
                         whereClausePart.getLValue(), true, adapter);
             }
         }
         else
         {
-            result = objectOrColumnPsPartBuilder.buildPs(
+            result = getObjectOrColumnPsPartBuilder().buildPs(
                     whereClausePart.getLValue(), ignoreCase, adapter);
         }
 

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/NullValueBuilder.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/NullValueBuilder.java?rev=1377555&r1=1377554&r2=1377555&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/NullValueBuilder.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/NullValueBuilder.java
Mon Aug 27 02:52:28 2012
@@ -59,7 +59,7 @@ public class NullValueBuilder extends Ab
         if (whereClausePart.getOperator().equals(SqlEnum.ISNULL)
             || whereClausePart.getOperator().equals(SqlEnum.ISNOTNULL))
         {
-            result = objectOrColumnPsPartBuilder.buildPs(
+            result = getObjectOrColumnPsPartBuilder().buildPs(
                     whereClausePart.getLValue(), ignoreCase, adapter);
             result.getSql().append(whereClausePart.getOperator());
             return result;
@@ -68,7 +68,7 @@ public class NullValueBuilder extends Ab
         // now we know from isApplicable() that rValue is null
         if (whereClausePart.getOperator().equals(SqlEnum.EQUAL))
         {
-            result = objectOrColumnPsPartBuilder.buildPs(
+            result = getObjectOrColumnPsPartBuilder().buildPs(
                     whereClausePart.getLValue(), ignoreCase, adapter);
             result.getSql().append(SqlEnum.ISNULL);
             return result;
@@ -77,7 +77,7 @@ public class NullValueBuilder extends Ab
             || whereClausePart.getOperator().equals(
                     SqlEnum.ALT_NOT_EQUAL))
         {
-            result = objectOrColumnPsPartBuilder.buildPs(
+            result = getObjectOrColumnPsPartBuilder().buildPs(
                     whereClausePart.getLValue(), ignoreCase, adapter);
             result.getSql().append(SqlEnum.ISNOTNULL);
             return result;

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/StandardBuilder.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/StandardBuilder.java?rev=1377555&r1=1377554&r2=1377555&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/StandardBuilder.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/sql/whereclausebuilder/StandardBuilder.java
Mon Aug 27 02:52:28 2012
@@ -52,10 +52,10 @@ public class StandardBuilder extends Abs
                 Adapter db)
             throws TorqueException
     {
-        PreparedStatementPart result = objectOrColumnPsPartBuilder.buildPs(
+        PreparedStatementPart result = getObjectOrColumnPsPartBuilder().buildPs(
                 whereClausePart.getLValue(), ignoreCase, db);
         result.getSql().append(whereClausePart.getOperator());
-        result.append(objectOrColumnPsPartBuilder.buildPs(
+        result.append(getObjectOrColumnPsPartBuilder().buildPs(
                 whereClausePart.getRValue(), ignoreCase, db));
         return result;
     }



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


Mime
View raw message