db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1586449 - in /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer: base/setAndSaveReferencing.vm impl/base/setAndSaveReferencing.vm
Date Thu, 10 Apr 2014 19:36:36 GMT
Author: tfischer
Date: Thu Apr 10 19:36:36 2014
New Revision: 1586449

URL: http://svn.apache.org/r1586449
Log:
TORQUE-315: fix javadoc
simplify generated code

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/setAndSaveReferencing.vm
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/setAndSaveReferencing.vm

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/setAndSaveReferencing.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/setAndSaveReferencing.vm?rev=1586449&r1=1586448&r2=1586449&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/setAndSaveReferencing.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/setAndSaveReferencing.vm
Thu Apr 10 19:36:36 2014
@@ -59,7 +59,7 @@
      *        may not contain null.
      *
      * @throws TorqueException if an error accessing the database occurs.
-     * @throws NullPointerException if toFill is null or contains null elements.
+     * @throws NullPointerException if toSave is null or contains null elements.
      */
     public static void ${setAndSaveMethodName}(
             ${localDbObjectClassName} toLinkTo,
@@ -98,7 +98,7 @@
      * @param connection the database connection to use.
      *
      * @throws TorqueException if an error accessing the database occurs.
-     * @throws NullPointerException if toFill is null or contains null elements.
+     * @throws NullPointerException if toSave is null or contains null elements.
      */
     public void ${setAndSaveMethodName}(
             ${localDbObjectClassName} toLinkTo,

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/setAndSaveReferencing.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/setAndSaveReferencing.vm?rev=1586449&r1=1586448&r2=1586449&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/setAndSaveReferencing.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/setAndSaveReferencing.vm
Thu Apr 10 19:36:36 2014
@@ -66,7 +66,7 @@
      *        may not contain null.
      *
      * @throws TorqueException if an error accessing the database occurs.
-     * @throws NullPointerException if toFill is null or contains null elements.
+     * @throws NullPointerException if toSave is null or contains null elements.
      */
     public void ${setAndSaveMethodName}(
             ${localDbObjectClassName} toLinkTo,
@@ -120,7 +120,7 @@
      * @param connection the database connection to use.
      *
      * @throws TorqueException if an error accessing the database occurs.
-     * @throws NullPointerException if toFill is null or contains null elements.
+     * @throws NullPointerException if toSave is null or contains null elements.
      */
     public void ${setAndSaveMethodName}(
             ${localDbObjectClassName} toLinkTo,
@@ -236,14 +236,13 @@
                     criteria,
                     connection);
         }
-        $fieldType linkedCache;
-        if (toLinkTo.${isInitialized}()) {
-            linkedCache = toLinkTo.${getter}();
-            linkedCache.clear();
+        if (toLinkTo.${isInitialized}())
+        {
+            toLinkTo.${getter}().clear();
         }
         else
         {
-            linkedCache = toLinkTo.${initializer}();
+           toLinkTo.${initializer}();
         }
         for (${foreignDbObjectClassName} toSaveElement : toSave)
         {



---------------------------------------------------------------------
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