org.datanucleus.store
Class DefaultCandidateExtent

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

public class DefaultCandidateExtent
extends AbstractExtent

Extent that does a simple JDOQL query for the candidate with/without subclasses.


Field Summary
protected  java.util.HashMap<java.util.Iterator,QueryResult> queryResultsByIterator
          Map of the iterators of the Extents accessed.
 
Fields inherited from class org.datanucleus.store.AbstractExtent
candidateClass, cmd, ec, LOCALISER, storeMgr, subclasses
 
Constructor Summary
DefaultCandidateExtent(ExecutionContext ec, java.lang.Class cls, boolean subclasses, AbstractClassMetaData cmd)
          Constructor.
 
Method Summary
 void close(java.util.Iterator iterator)
          Close the specified iterator.
 void closeAll()
          Close all iterators and all resources for this extent.
 ExecutionContext getExecutionContext()
          Accessor for the owning execution context.
 FetchPlan getFetchPlan()
           
 boolean hasSubclasses()
          Returns whether this Extent was defined to contain subclasses.
 java.util.Iterator iterator()
          Accessor for an iterator over the extent.
 
Methods inherited from class org.datanucleus.store.AbstractExtent
getCandidateClass, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

queryResultsByIterator

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

Constructor Detail

DefaultCandidateExtent

public DefaultCandidateExtent(ExecutionContext ec,
                              java.lang.Class cls,
                              boolean subclasses,
                              AbstractClassMetaData cmd)
Constructor.

Parameters:
ec - execution context
cls - candidate class
subclasses - Whether to include subclasses
cmd - MetaData for the candidate class
Method Detail

iterator

public java.util.Iterator iterator()
Description copied from interface: Extent
Accessor for an iterator over the extent.

Returns:
The iterator

hasSubclasses

public boolean hasSubclasses()
Description copied from class: AbstractExtent
Returns whether this Extent was defined to contain subclasses.

Specified by:
hasSubclasses in interface Extent
Overrides:
hasSubclasses in class AbstractExtent
Returns:
true if this Extent was defined to include subclasses.

getExecutionContext

public ExecutionContext getExecutionContext()
Description copied from class: AbstractExtent
Accessor for the owning execution context.

Specified by:
getExecutionContext in interface Extent
Overrides:
getExecutionContext in class AbstractExtent
Returns:
execution context

getFetchPlan

public FetchPlan getFetchPlan()

closeAll

public void closeAll()
Description copied from interface: Extent
Close all iterators and all resources for this extent.


close

public void close(java.util.Iterator iterator)
Description copied from interface: Extent
Close the specified iterator.

Parameters:
iterator - The iterator


Copyright © 2011. All Rights Reserved.