db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/core QueryReferenceBroker.java
Date Mon, 08 Dec 2003 21:25:02 GMT
brj         2003/12/08 13:25:01

  Modified:    src/java/org/apache/ojb/broker/core
                        QueryReferenceBroker.java
  Log:
  use RelationshipPrefetcherFactory
  
  Revision  Changes    Path
  1.2       +8 -16     db-ojb/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java
  
  Index: QueryReferenceBroker.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- QueryReferenceBroker.java	28 Nov 2003 14:40:00 -0000	1.1
  +++ QueryReferenceBroker.java	8 Dec 2003 21:25:01 -0000	1.2
  @@ -58,8 +58,7 @@
   import org.apache.ojb.broker.ManageableCollection;
   import org.apache.ojb.broker.PersistenceBrokerException;
   import org.apache.ojb.broker.VirtualProxy;
  -import org.apache.ojb.broker.accesslayer.BasePrefetcher;
  -import org.apache.ojb.broker.accesslayer.CollectionPrefetcher;
  +import org.apache.ojb.broker.accesslayer.*;
   import org.apache.ojb.broker.accesslayer.CollectionProxy;
   import org.apache.ojb.broker.accesslayer.CollectionProxyListener;
   import org.apache.ojb.broker.accesslayer.IndirectionHandler;
  @@ -315,14 +314,7 @@
                       continue;
                   }
   
  -                if (ord instanceof CollectionDescriptor)
  -                {
  -                    prefetcher = new CollectionPrefetcher(pb, ord);
  -                }
  -                else
  -                {
  -                    prefetcher = new ReferencePrefetcher(pb, ord);
  -                }
  +                prefetcher = RelationshipPrefetcherFactory.createRelationshipPrefetcher(pb,
ord);    
                   prefetcher.prefetchRelationship(owners);
                   it.remove();
               }
  @@ -761,7 +753,7 @@
               }
           }
   
  -        protected BasePrefetcher getPrefetcher(Object listenedObject)
  +        protected RelationshipPrefetcher getPrefetcher(Object listenedObject)
           {
               if (_key instanceof ObjectReferenceDescriptor)
               {
  @@ -808,13 +800,13 @@
   
           abstract protected void removeThisListener();
   
  -        abstract protected BasePrefetcher getPrefetcher(Object listenedObject);
  +        abstract protected RelationshipPrefetcher getPrefetcher(Object listenedObject);
   
           protected void prefetch(Object listenedObject)
           {
               ArrayList owners = (ArrayList) _retrievalTasks.get(_key);
               List toPrefetch;
  -            BasePrefetcher prefetcher;
  +            RelationshipPrefetcher prefetcher;
               boolean prefetchingAll;
   
               removeThisListener();
  @@ -888,9 +880,9 @@
               }
           }
   
  -        protected BasePrefetcher getPrefetcher(Object listenedObject)
  +        protected RelationshipPrefetcher getPrefetcher(Object listenedObject)
           {
  -            return new CollectionPrefetcher(pb, (CollectionDescriptor) _key);
  +            return RelationshipPrefetcherFactory.createRelationshipPrefetcher(pb, (CollectionDescriptor)_key);
           }
   
           public void beforeLoading(CollectionProxy col)
  
  
  

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