org.datanucleus.store.rdbms.extent
Class AbstractRDBMSExtent

java.lang.Object
  extended by org.datanucleus.store.AbstractExtent
      extended by org.datanucleus.store.rdbms.extent.AbstractRDBMSExtent
All Implemented Interfaces:
org.datanucleus.store.Extent
Direct Known Subclasses:
ClassTableExtent, ClassViewExtent

public abstract class AbstractRDBMSExtent
extends org.datanucleus.store.AbstractExtent

Abstract representation of an Extent for RDBMS datastores.


Field Summary
protected  org.datanucleus.store.query.Query query
          Query executed for returning the Extent.
protected  java.util.HashMap<java.util.Iterator,org.datanucleus.store.query.QueryResult> queryResultsByIterator
          Map of the iterators of the Extents accessed.
 
Fields inherited from class org.datanucleus.store.AbstractExtent
candidateClass, cmd, LOCALISER, om, storeMgr, subclasses
 
Constructor Summary
AbstractRDBMSExtent(org.datanucleus.ObjectManager om, java.lang.Class cls, boolean subclasses, org.datanucleus.metadata.AbstractClassMetaData cmd)
          Constructor.
 
Method Summary
 void close(java.util.Iterator iter)
          Close an Iterator associated with this Extent instance.
 void closeAll()
          Close all Iterators associated with this Extent instance.
 org.datanucleus.FetchPlan getFetchPlan()
          This method retrieves the fetch plan associated with the Extent.
 java.util.Iterator iterator()
          Returns an iterator over all the instances in the Extent.
 
Methods inherited from class org.datanucleus.store.AbstractExtent
getCandidateClass, getObjectManager, hasSubclasses, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

query

protected final org.datanucleus.store.query.Query query
Query executed for returning the Extent.


queryResultsByIterator

protected java.util.HashMap<java.util.Iterator,org.datanucleus.store.query.QueryResult> queryResultsByIterator
Map of the iterators of the Extents accessed.

Constructor Detail

AbstractRDBMSExtent

public AbstractRDBMSExtent(org.datanucleus.ObjectManager om,
                           java.lang.Class cls,
                           boolean subclasses,
                           org.datanucleus.metadata.AbstractClassMetaData cmd)
Constructor.

Parameters:
om - Object Manager
cls - candidate class
subclasses - Whether to include subclasses
cmd - MetaData for the candidate class
Method Detail

iterator

public java.util.Iterator iterator()
Returns an iterator over all the instances in the Extent.

Returns:
an iterator over all the instances in the Extent.

close

public void close(java.util.Iterator iter)
Close an Iterator associated with this Extent instance. Iterators closed by this method will return false to hasNext() and will throw NoSuchElementException on next(). The Extent instance can still be used as a parameter of Query.setCandidates, and to get an Iterator.

Parameters:
iter - an iterator obtained by the method iterator() on this Extent instance.

closeAll

public void closeAll()
Close all Iterators associated with this Extent instance. Iterators closed by this method will return false to hasNext() and will throw NoSuchElementException on next(). The Extent instance can still be used as a parameter of Query.setCandidates, and to get an Iterator.


getFetchPlan

public org.datanucleus.FetchPlan getFetchPlan()
This method retrieves the fetch plan associated with the Extent. It always returns the identical instance for the same Extent instance. Any change made to the fetch plan affects subsequent instance retrievals via next(). Only instances not already in memory are affected by the fetch plan. Fetch plan is described in Section 12.7.

Returns:
the FetchPlan


Copyright © 2009. All Rights Reserved.