org.datanucleus.store.db4o
Class DB4OExtent

java.lang.Object
  extended by org.datanucleus.store.AbstractExtent
      extended by org.datanucleus.store.db4o.DB4OExtent
All Implemented Interfaces:
org.datanucleus.store.Extent

public class DB4OExtent
extends org.datanucleus.store.AbstractExtent

Extent for use with DB4O datastores. The Extent is generated in two ways :-


Nested Class Summary
 class DB4OExtent.DB4OExtentIterator
          Iterator for use with DB4O Extents.
 
Field Summary
protected static org.datanucleus.util.Localiser LOCALISER_DB4O
          Localiser for messages.
 
Fields inherited from class org.datanucleus.store.AbstractExtent
candidateClass, cmd, LOCALISER, om, storeMgr, subclasses
 
Constructor Summary
DB4OExtent(org.datanucleus.ObjectManager om, java.lang.Class cls, boolean subclasses, org.datanucleus.metadata.AbstractClassMetaData cmd)
          Constructor.
 
Method Summary
 void close(java.util.Iterator iter)
          Method to close the extent.
 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

LOCALISER_DB4O

protected static final org.datanucleus.util.Localiser LOCALISER_DB4O
Localiser for messages.

Constructor Detail

DB4OExtent

public DB4OExtent(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

close

public void close(java.util.Iterator iter)
Method to close the extent.

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.


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.

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 © 2010. All Rights Reserved.