org.apache.ojb.broker.accesslayer
Class PlainPrefetcher

java.lang.Object
  extended by org.apache.ojb.broker.accesslayer.BasePrefetcher
      extended by org.apache.ojb.broker.accesslayer.PlainPrefetcher
All Implemented Interfaces:
RelationshipPrefetcher

public class PlainPrefetcher
extends BasePrefetcher

Prefetcher for plain list of objects (no relations).

Version:
$Id: PlainPrefetcher.java,v 1.1 2007-08-24 22:17:30 ewestfal Exp $
Author:
Oleg Nitz

Field Summary
 
Fields inherited from class org.apache.ojb.broker.accesslayer.BasePrefetcher
IN_LIMIT, itemClassDesc, pkLimit
 
Constructor Summary
PlainPrefetcher(PersistenceBrokerImpl aBroker, Class anItemClass)
           
 
Method Summary
protected  void associateBatched(Collection proxies, Collection realSubjects)
          associate the batched Children with their owner object
protected  Query[] buildPrefetchQueries(Collection proxies, Collection realSubjects)
          Build the multiple queries for one relationship because of limitation of IN(...)
protected  Query buildPrefetchQuery(Class clazz, Collection ids, boolean withExtents)
           
 void prepareRelationshipSettings()
          Prepare the Relationship for prefetch (ie: disable auto-retrieve)
 void restoreRelationshipSettings()
          Restore the Relationship settings(ie: enable auto-retrieve)
 
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

PlainPrefetcher

public PlainPrefetcher(PersistenceBrokerImpl aBroker,
                       Class anItemClass)
Method Detail

prepareRelationshipSettings

public void prepareRelationshipSettings()
Description copied from interface: RelationshipPrefetcher
Prepare the Relationship for prefetch (ie: disable auto-retrieve)


restoreRelationshipSettings

public void restoreRelationshipSettings()
Description copied from interface: RelationshipPrefetcher
Restore the Relationship settings(ie: enable auto-retrieve)


associateBatched

protected void associateBatched(Collection proxies,
                                Collection realSubjects)
Description copied from class: BasePrefetcher
associate the batched Children with their owner object

Specified by:
associateBatched in class BasePrefetcher

buildPrefetchQueries

protected Query[] buildPrefetchQueries(Collection proxies,
                                       Collection realSubjects)
Build the multiple queries for one relationship because of limitation of IN(...)

Specified by:
buildPrefetchQueries in class BasePrefetcher
Parameters:
proxies - Collection containing all proxy objects to load
realSubjects - Collection where real subjects found in the cache should be added.

buildPrefetchQuery

protected Query buildPrefetchQuery(Class clazz,
                                   Collection ids,
                                   boolean withExtents)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.