Class DefaultCandidateExtent<T>

  • All Implemented Interfaces:
    java.lang.AutoCloseable, Extent<T>

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

      • fetchPlan

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

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

        protected java.util.Map<java.util.Iterator,​QueryResult> queryResultsByIterator
        Map of the iterators of the Extents accessed.
    • Constructor Detail

      • DefaultCandidateExtent

        public DefaultCandidateExtent​(ExecutionContext ec,
                                      java.lang.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 Detail

      • iterator

        public java.util.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.
      • close

        public void close()
        Specified by:
        close in interface java.lang.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​(java.util.Iterator<T> iterator)
        Description copied from interface: Extent
        Close the specified iterator.
        Specified by:
        close in interface Extent<T>
        Parameters:
        iterator - The iterator