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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
