db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r757230 - in /db/torque/torque4/trunk: torque-site/src/changes/changes.xml torque-templates/src/main/resources/om/Peer.vm
Date Sun, 22 Mar 2009 18:19:26 GMT
Author: tv
Date: Sun Mar 22 18:19:26 2009
New Revision: 757230

URL: http://svn.apache.org/viewvc?rev=757230&view=rev
Log:
Changed Peer.vm to call the peer methods on the base peer class of the given table instead
of BasePeer. Fixes Torque-121

Modified:
    db/torque/torque4/trunk/torque-site/src/changes/changes.xml
    db/torque/torque4/trunk/torque-templates/src/main/resources/om/Peer.vm

Modified: db/torque/torque4/trunk/torque-site/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/changes/changes.xml?rev=757230&r1=757229&r2=757230&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/changes/changes.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/changes/changes.xml Sun Mar 22 18:19:26 2009
@@ -24,6 +24,13 @@
 
   <body>
   <release version="4.0-dev" date="in SVN Torque4 branch">
+    <action type="update" dev="tv">
+      Don't use deprecated methods in DatabaseMapInit.vm.
+    </action>
+    <action type="fix" dev="tv" issue="TORQUE-121" due-to="Tal Kramer">
+      Changed Peer.vm to call the peer methods on the base peer class
+      of the given table instead of BasePeer.
+    </action>
     <action type="update" dev="gmonroe">
       Changed the exception type thrown by doSelect calls when
       Criteria.isSingleRecord() true and more than one record is found.

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/om/Peer.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/om/Peer.vm?rev=757230&r1=757229&r2=757230&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/om/Peer.vm (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/om/Peer.vm Sun Mar 22 18:19:26
2009
@@ -292,11 +292,11 @@
 
         if (con == null)
         {
-            return BasePeer.doInsert(criteria);
+            return ${table.BasePeer}.doInsert(criteria);
         }
         else
         {
-            return BasePeer.doInsert(criteria, con);
+            return ${table.BasePeer}.doInsert(criteria, con);
         }
     }
 
@@ -458,15 +458,15 @@
 
         setDbName(criteria);
 
-        // BasePeer returns a List of Value (Village) arrays.  The array
+        // ${table.BasePeer} returns a List of Value (Village) arrays.  The array
         // order follows the order columns were placed in the Select clause.
         if (con == null)
         {
-            return BasePeer.doSelect(criteria);
+            return ${table.BasePeer}.doSelect(criteria);
         }
         else
         {
-            return BasePeer.doSelect(criteria, con);
+            return ${table.BasePeer}.doSelect(criteria, con);
         }
     }
 
@@ -614,11 +614,11 @@
 
         if (con == null)
         {
-            BasePeer.doUpdate(selectCriteria, criteria);
+            ${table.BasePeer}.doUpdate(selectCriteria, criteria);
         }
         else
         {
-            BasePeer.doUpdate(selectCriteria, criteria, con);
+            ${table.BasePeer}.doUpdate(selectCriteria, criteria, con);
         }
     }
 
@@ -654,11 +654,11 @@
 
         if (con == null)
         {
-            BasePeer.doDelete(criteria, TABLE_NAME);
+            ${table.BasePeer}.doDelete(criteria, TABLE_NAME);
         }
         else
         {
-            BasePeer.doDelete(criteria, TABLE_NAME, con);
+            ${table.BasePeer}.doDelete(criteria, TABLE_NAME, con);
         }
      }
 
@@ -1213,11 +1213,11 @@
         List#if($enableJava5Features)<Record>#end rows;
         if (conn == null)
         {
-            rows = BasePeer.doSelect(criteria);
+            rows = ${table.BasePeer}.doSelect(criteria);
         }
         else
         {
-            rows = BasePeer.doSelect(criteria,conn);
+            rows = ${table.BasePeer}.doSelect(criteria,conn);
         }
 
         List#if($enableJava5Features)<${table.JavaName}>#end results = new ArrayList#if($enableJava5Features)<${table.JavaName}>#end();
@@ -1374,11 +1374,11 @@
         List#if($enableJava5Features)<Record>#end rows;
         if (conn == null)
         {
-            rows = BasePeer.doSelect(criteria);
+            rows = ${table.BasePeer}.doSelect(criteria);
         }
         else
         {
-            rows = BasePeer.doSelect(criteria,conn);
+            rows = ${table.BasePeer}.doSelect(criteria,conn);
         }
 
         List#if($enableJava5Features)<${table.JavaName}>#end results = new ArrayList#if($enableJava5Features)<${table.JavaName}>#end();
@@ -1505,7 +1505,7 @@
     
 
 #if($enableJava5Features)
-    // The following methods wrap some methods in BasePeer
+    // The following methods wrap some methods in ${table.BasePeer}
     // to have more support for Java5 generic types in the Peer
     
     /**
@@ -1521,7 +1521,7 @@
      */
     public static List<Record> executeQuery(String queryString) throws TorqueException
     {
-        return BasePeer.executeQuery(queryString);
+        return ${table.BasePeer}.executeQuery(queryString);
     }
 
     /**
@@ -1539,7 +1539,7 @@
     public static List<Record> executeQuery(String queryString, String dbName)
         throws TorqueException
     {
-        return BasePeer.executeQuery(queryString,dbName);
+        return ${table.BasePeer}.executeQuery(queryString,dbName);
     }
     
 
@@ -1561,7 +1561,7 @@
         boolean singleRecord)
         throws TorqueException
     {
-        return BasePeer.executeQuery(queryString,dbName,singleRecord);
+        return ${table.BasePeer}.executeQuery(queryString,dbName,singleRecord);
     }
 
     /**
@@ -1582,7 +1582,7 @@
         Connection con)
         throws TorqueException
     {
-        return BasePeer.executeQuery(queryString,singleRecord,con);
+        return ${table.BasePeer}.executeQuery(queryString,singleRecord,con);
     }
 
     /**
@@ -1607,7 +1607,7 @@
         boolean singleRecord)
         throws TorqueException
     {
-        return BasePeer.executeQuery(queryString,start,numberOfResults,dbName,singleRecord);
+        return ${table.BasePeer}.executeQuery(queryString,start,numberOfResults,dbName,singleRecord);
     }
 
     /**
@@ -1632,7 +1632,7 @@
         Connection con)
         throws TorqueException
     {
-        return BasePeer.executeQuery(queryString,start,numberOfResults,singleRecord,con);
+        return ${table.BasePeer}.executeQuery(queryString,start,numberOfResults,singleRecord,con);
     }
 
     /**
@@ -1649,7 +1649,7 @@
     public static List<Record> getSelectResults(QueryDataSet qds)
         throws TorqueException
     {
-        return BasePeer.getSelectResults(qds);
+        return ${table.BasePeer}.getSelectResults(qds);
     }
     
     /**
@@ -1667,7 +1667,7 @@
     public static List<Record> getSelectResults(QueryDataSet qds, boolean singleRecord)
         throws TorqueException
     {
-        return BasePeer.getSelectResults(qds,singleRecord);
+        return ${table.BasePeer}.getSelectResults(qds,singleRecord);
     }
     
     /**
@@ -1690,7 +1690,7 @@
         boolean singleRecord)
         throws TorqueException
     {
-        return BasePeer.getSelectResults(qds,numberOfResults,singleRecord);
+        return ${table.BasePeer}.getSelectResults(qds,numberOfResults,singleRecord);
     }
 
     /**
@@ -1717,7 +1717,7 @@
         boolean singleRecord)
         throws TorqueException
     {
-        return BasePeer.getSelectResults(qds,start,numberOfResults,singleRecord);
+        return ${table.BasePeer}.getSelectResults(qds,start,numberOfResults,singleRecord);
     }
 
     /**
@@ -1733,7 +1733,7 @@
     public static List<Record> doPSSelect(Criteria criteria, Connection con)
         throws TorqueException
     {
-        return BasePeer.doPSSelect(criteria,con);
+        return ${table.BasePeer}.doPSSelect(criteria,con);
     }
 
     /**
@@ -1747,7 +1747,7 @@
      */
     public static List<Record> doPSSelect(Criteria criteria) throws TorqueException
     {
-        return BasePeer.doPSSelect(criteria);
+        return ${table.BasePeer}.doPSSelect(criteria);
     }
 #end
 }



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