db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmon...@apache.org
Subject svn commit: r750548 - in /db/torque/torque4/trunk: torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java torque-site/src/changes/changes.xml
Date Thu, 05 Mar 2009 18:52:24 GMT
Author: gmonroe
Date: Thu Mar  5 18:52:21 2009
New Revision: 750548

URL: http://svn.apache.org/viewvc?rev=750548&view=rev
Log:
Changed the exception type thrown by doSelect calls when Criteria.isSingleRecord() true and
more than one record is found. A TooManyRecordsException (ToqueException subclass) is now
returned instead of a TorqueException.

Modified:
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java
    db/torque/torque4/trunk/torque-site/src/changes/changes.xml

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java?rev=750548&r1=750547&r2=750548&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java
Thu Mar  5 18:52:21 2009
@@ -36,6 +36,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.torque.Database;
+import org.apache.torque.TooManyRowsException;
 import org.apache.torque.Torque;
 import org.apache.torque.TorqueException;
 import org.apache.torque.adapter.DB;
@@ -78,6 +79,11 @@
 public abstract class BasePeer
         implements Serializable
 {
+    /**
+     * Serial Version
+     */
+    private static final long serialVersionUID = -7702123730779032381L;
+
     /** Constant criteria key to reference ORDER BY columns. */
     public static final String ORDER_BY = "ORDER BY";
 
@@ -1365,12 +1371,12 @@
      * needed.
      *
      * @param ds The DataSet which contains multiple records.
-     * @exception TorqueException Couldn't handle multiple records.
+     * @exception TooManyRowsException Couldn't handle multiple records.
      */
     protected static void handleMultipleRecords(DataSet ds)
-        throws TorqueException
+        throws TooManyRowsException
     {
-        throw new TorqueException("Criteria expected single Record and "
+        throw new TooManyRowsException("Criteria expected single Record and "
                 + "Multiple Records were selected");
     }
 

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=750548&r1=750547&r2=750548&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/changes/changes.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/changes/changes.xml Thu Mar  5 18:52:21 2009
@@ -23,7 +23,20 @@
   </properties>
 
   <body>
-  <release version="3.4-dev" date="in SVN">
+  <release version="4.0-dev" date="in SVN Torque4 branch">
+    <action type="update" dev="gmonroe">
+      Changed the exception type thrown by doSelect calls when
+      Criteria.isSingleRecord() true and more than one record is found.
+      A TooManyRecordsException (ToqueException subclass) is now returned
+      instead of a TorqueException.
+    </action>
+    <action type="add" dev="gmonroe">
+      Added support for DB Adaptor specific SQL functions.
+    </action>
+    <action type="add" dev="gmonroe">
+      Add a SummaryHelper class which supports aggregate queries.  E.g. 
+      Select Sum(x) from table.
+    </action>
   </release>
   <release version="3.3" date="2008-02-29">
   </release>



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