db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r469563 [2/2] - in /db/ojb/trunk/src/java/org/apache/ojb/odmg: ./ oql/
Date Tue, 31 Oct 2006 17:09:21 GMT
Modified: db/ojb/trunk/src/java/org/apache/ojb/odmg/oql/OQLQueryImpl.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/java/org/apache/ojb/odmg/oql/OQLQueryImpl.java?view=diff&rev=469563&r1=469562&r2=469563
==============================================================================
--- db/ojb/trunk/src/java/org/apache/ojb/odmg/oql/OQLQueryImpl.java (original)
+++ db/ojb/trunk/src/java/org/apache/ojb/odmg/oql/OQLQueryImpl.java Tue Oct 31 09:09:20 2006
@@ -24,6 +24,7 @@
 
 import org.apache.ojb.broker.ManageableCollection;
 import org.apache.ojb.broker.PersistenceBroker;
+import org.apache.ojb.broker.PersistenceConfiguration;
 import org.apache.ojb.broker.accesslayer.OJBIterator;
 import org.apache.ojb.broker.query.BindableCriterion;
 import org.apache.ojb.broker.query.Criteria;
@@ -74,16 +75,6 @@
     }
 
     /**
-     * Returns the collection class used to contain oql query result sets.
-     *
-     * @return The collection class
-     */
-    public Class getCollectionClass()
-    {
-        return odmg.getOqlCollectionClass();
-    }
-
-    /**
      * Bind a parameter to the query.
      * A parameter is denoted in the query string passed to <code>create</code>
by <i>$i</i>,
      * where <i>i</i> is the rank of the parameter, beginning with 1.
@@ -236,7 +227,8 @@
 
         try
         {
-            capsule = new PBCapsule(odmg.getCurrentDatabase().getPersistenceConfiguration(),
tx);
+            PersistenceConfiguration pc = odmg.getCurrentDatabase().getPersistenceConfiguration();
+            capsule = new PBCapsule(pc, tx);
             PersistenceBroker broker = capsule.getBroker();
 
             // ask the broker to perfom the query.
@@ -244,7 +236,7 @@
 
             if (!(query instanceof ReportQuery))
             {
-                result = broker.getCollectionByQuery(this.getCollectionClass(), query);
+                result = broker.getCollectionByQuery(pc.getCollectionFactory().getCollectionTypes().getOQLQuery(),
query);
                 /*
                 arminw: This is used to re-/initialize OJBAssociate objects
                 (e.g. the odmg collection implementations use this interface)



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


Mime
View raw message