Class JDOExtent<E>

java.lang.Object
org.datanucleus.api.jdo.JDOExtent<E>
Type Parameters:
E - type that this Extent is for.
All Implemented Interfaces:
AutoCloseable, Iterable<E>, javax.jdo.Extent<E>

public class JDOExtent<E> extends Object implements javax.jdo.Extent<E>
Wrapper implementation of a JDO Extent.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
     
    (package private) org.datanucleus.store.query.Extent<E>
    Underlying Extent.
    (package private) JDOFetchPlan
    JDO Fetch Plan.
    (package private) javax.jdo.PersistenceManager
    Underlying PersistenceManager.
  • Constructor Summary

    Constructors
    Constructor
    Description
    JDOExtent(javax.jdo.PersistenceManager pm, org.datanucleus.store.query.Extent extent)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    close(Iterator<E> iterator)
    Method to close the Extent iterator.
    void
    Method to close all Extent iterators.
    Accessor for the candidate class of the Extent.
    org.datanucleus.store.query.Extent<E>
    Accessor for the real extent.
    javax.jdo.FetchPlan
    Accessor for the FetchPlan for the Extent.
    javax.jdo.PersistenceManager
    Accessor for the PersistenceManager.
    boolean
    Accessor for whether the Extent includes subclasses.
    Accessor for an iterator for this Extent.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

    • closed

      private boolean closed
    • pm

      javax.jdo.PersistenceManager pm
      Underlying PersistenceManager.
    • extent

      org.datanucleus.store.query.Extent<E> extent
      Underlying Extent.
    • fetchPlan

      JDOFetchPlan fetchPlan
      JDO Fetch Plan.
  • Constructor Details

    • JDOExtent

      public JDOExtent(javax.jdo.PersistenceManager pm, org.datanucleus.store.query.Extent extent)
      Constructor.
      Parameters:
      pm - PersistenceManager
      extent - Underlying Extent
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface javax.jdo.Extent<E>
    • close

      public void close(Iterator<E> iterator)
      Method to close the Extent iterator.
      Specified by:
      close in interface javax.jdo.Extent<E>
      Parameters:
      iterator - Iterator for the extent.
    • closeAll

      public void closeAll()
      Method to close all Extent iterators.
      Specified by:
      closeAll in interface javax.jdo.Extent<E>
    • getCandidateClass

      public Class<E> getCandidateClass()
      Accessor for the candidate class of the Extent.
      Specified by:
      getCandidateClass in interface javax.jdo.Extent<E>
      Returns:
      Candidate class
    • hasSubclasses

      public boolean hasSubclasses()
      Accessor for whether the Extent includes subclasses.
      Specified by:
      hasSubclasses in interface javax.jdo.Extent<E>
      Returns:
      Whether it has subclasses
    • getFetchPlan

      public javax.jdo.FetchPlan getFetchPlan()
      Accessor for the FetchPlan for the Extent.
      Specified by:
      getFetchPlan in interface javax.jdo.Extent<E>
      Returns:
      FetchPlan
    • getPersistenceManager

      public javax.jdo.PersistenceManager getPersistenceManager()
      Accessor for the PersistenceManager.
      Specified by:
      getPersistenceManager in interface javax.jdo.Extent<E>
      Returns:
      The PM
    • getExtent

      public org.datanucleus.store.query.Extent<E> getExtent()
      Accessor for the real extent.
      Returns:
      The Underlying extent
    • iterator

      public Iterator<E> iterator()
      Accessor for an iterator for this Extent.
      Specified by:
      iterator in interface javax.jdo.Extent<E>
      Specified by:
      iterator in interface Iterable<E>
      Returns:
      The iterator