Class DefaultCandidateExtent<T>

java.lang.Object
org.datanucleus.store.query.AbstractExtent<T>
org.datanucleus.store.query.DefaultCandidateExtent<T>
All Implemented Interfaces:
AutoCloseable, Extent<T>

public class DefaultCandidateExtent<T> extends AbstractExtent<T> implements AutoCloseable
Extent that does a simple JDOQL query for the candidate with/without subclasses.
  • Field Details

    • fetchPlan

      private FetchPlan fetchPlan
      FetchPlan for use with this Extent.
    • query

      private Query query
      Underlying query for getting the Extent.
    • queryResultsByIterator

      protected Map<Iterator,QueryResult> queryResultsByIterator
      Map of the iterators of the Extents accessed.
  • Constructor Details

    • DefaultCandidateExtent

      public DefaultCandidateExtent(ExecutionContext ec, Class<T> 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 Details

    • iterator

      public Iterator<T> iterator()
      Description copied from interface: Extent
      Accessor for an iterator over the extent.
      Specified by:
      iterator in interface Extent<T>
      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<T>
      Overrides:
      hasSubclasses in class AbstractExtent<T>
      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<T>
      Overrides:
      getExecutionContext in class AbstractExtent<T>
      Returns:
      execution context
    • getFetchPlan

      public FetchPlan getFetchPlan()
      Specified by:
      getFetchPlan in interface Extent<T>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • closeAll

      public void closeAll()
      Description copied from interface: Extent
      Close all iterators and all resources for this extent.
      Specified by:
      closeAll in interface Extent<T>
    • close

      public void close(Iterator<T> iterator)
      Description copied from interface: Extent
      Close the specified iterator.
      Specified by:
      close in interface Extent<T>
      Parameters:
      iterator - The iterator