org.apache.ojb.broker.accesslayer
Class ReferencePrefetcher

java.lang.Object
  extended byorg.apache.ojb.broker.accesslayer.BasePrefetcher
      extended byorg.apache.ojb.broker.accesslayer.RelationshipPrefetcherImpl
          extended byorg.apache.ojb.broker.accesslayer.ReferencePrefetcher
All Implemented Interfaces:
RelationshipPrefetcher

public class ReferencePrefetcher
extends RelationshipPrefetcherImpl

Relationship Prefetcher for References.

Version:
$Id: ReferencePrefetcher.java,v 1.14 2003/11/01 21:09:41 brj Exp $
Author:
Jakob Braeuchi

Field Summary
 
Fields inherited from class org.apache.ojb.broker.accesslayer.BasePrefetcher
IN_LIMIT, itemClassDesc, pkLimit
 
Constructor Summary
ReferencePrefetcher(PersistenceBroker aBroker, ObjectReferenceDescriptor anOrd)
          Constructor for ReferencePrefetcher.
 
Method Summary
protected  void associateBatched(java.util.Collection owners, java.util.Collection children)
          Associate the batched Children with their owner object.
protected  Query[] buildPrefetchQueries(java.util.Collection owners, java.util.Collection children)
          Build the multiple queries for one relationship because of limitation of IN(...)
protected  Query buildPrefetchQuery(java.util.Collection ids)
           
 
Methods inherited from class org.apache.ojb.broker.accesslayer.RelationshipPrefetcherImpl
getObjectReferenceDescriptor, getOwnerClassDescriptor, isCascadeRetrieve, prepareRelationshipSettings, restoreRelationshipSettings, setCascadeRetrieve, setObjectReferenceDescriptor
 
Methods inherited from class org.apache.ojb.broker.accesslayer.BasePrefetcher
buildPrefetchCriteria, buildPrefetchQuery, buildPrefetchQuery, getBroker, getDescriptorRepository, getItemClassDescriptor, getLimit, getLogger, prefetchRelationship
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferencePrefetcher

public ReferencePrefetcher(PersistenceBroker aBroker,
                           ObjectReferenceDescriptor anOrd)
Constructor for ReferencePrefetcher.

Parameters:
aBroker -
anOrd -
Method Detail

associateBatched

protected void associateBatched(java.util.Collection owners,
                                java.util.Collection children)
Associate the batched Children with their owner object. Loop over owners

Specified by:
associateBatched in class BasePrefetcher

buildPrefetchQueries

protected Query[] buildPrefetchQueries(java.util.Collection owners,
                                       java.util.Collection children)
Build the multiple queries for one relationship because of limitation of IN(...)

Specified by:
buildPrefetchQueries in class BasePrefetcher
Parameters:
owners - Collection containing all objects of the ONE side
children - Collection where related objects found in the cache should be added.

buildPrefetchQuery

protected Query buildPrefetchQuery(java.util.Collection ids)
See Also:
org.apache.ojb.broker.accesslayer.RelationshipPrefetcherImpl#buildPrefetchQueries(Collection)


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14