You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by th...@apache.org on 2003/05/01 19:23:59 UTC

cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer CollectionProxy.java

thma        2003/05/01 10:23:59

  Modified:    src/java/org/apache/ojb/broker/core
                        PersistenceBrokerImpl.java
               src/java/org/apache/ojb/broker/accesslayer
                        CollectionProxy.java
  Log:
  use the RemovalAwareCollection as the default Collection implementation in PB.
  
  Revision  Changes    Path
  1.2       +3 -2      db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
  
  Index: PersistenceBrokerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PersistenceBrokerImpl.java	26 Apr 2003 23:18:25 -0000	1.1
  +++ PersistenceBrokerImpl.java	1 May 2003 17:23:58 -0000	1.2
  @@ -92,6 +92,7 @@
   import org.apache.ojb.broker.util.ObjectModification;
   import org.apache.ojb.broker.util.ProxyHelper;
   import org.apache.ojb.broker.util.collections.ManageableVector;
  +import org.apache.ojb.broker.util.collections.RemovalAwareCollection;
   import org.apache.ojb.broker.util.configuration.Configuration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.broker.util.logging.Logger;
  @@ -1485,7 +1486,7 @@
           // thma: the following cast is safe because:
           // 1. ManageableVector implements Collection (will be returned if lazy == false)
           // 2. CollectionProxy implements Collection (will be returned if lazy == true)
  -        return (Collection) getCollectionByQuery(ManageableVector.class, query, lazy);
  +        return (Collection) getCollectionByQuery(RemovalAwareCollection.class, query, lazy);
       }
   
       /**
  
  
  
  1.17      +3 -2      db-ojb/src/java/org/apache/ojb/broker/accesslayer/CollectionProxy.java
  
  Index: CollectionProxy.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/CollectionProxy.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- CollectionProxy.java	26 Apr 2003 23:18:25 -0000	1.16
  +++ CollectionProxy.java	1 May 2003 17:23:58 -0000	1.17
  @@ -67,6 +67,7 @@
   import org.apache.ojb.broker.core.PersistenceBrokerThreadMapping;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.util.collections.ManageableVector;
  +import org.apache.ojb.broker.util.collections.RemovalAwareCollection;
   
   /**
    * CollectionProxy. <br>
  @@ -94,7 +95,7 @@
   
   	public CollectionProxy(PBKey aKey, Query aQuery)
   	{
  -		this(aKey, ManageableVector.class, aQuery);
  +		this(aKey, RemovalAwareCollection.class, aQuery);
   	}
   
   	public CollectionProxy(PBKey aKey, Class aCollClass, Query aQuery)