oracle.toplink.jdo
Class JDOExtent

oracle.toplink.jdo.JDOExtent

public class JDOExtent

PUBLIC:

JDO wrapper for TopLink query results. JDO:

Instances of the Extent class represent the entire collection of instances in the data store of the candidate class possibly including its subclasses.

The Extent instance has two possible uses:

  1. to iterate all instances in of a particular class
  2. to execute a Query in the data store over all instances of a particular class


    Constructor Summary
     
    Method Summary
    TypeMethod
     void close(java.util.Iterator iterator)
              Close an Iterator associated with this Extent instance.
     void closeAll()
              Close all Iterators associated with this Extent instance.
     java.lang.Class getCandidateClass()
              An Extent contains all instances of a particular Class in the data store; this method returns the Class of the instances
     JDOPersistenceManager getManager()
              Return the JDOPersistenceManager.
     java.util.Set getOpenCursors()
              Return the open scrollable cursors on this extent.
     oracle.toplink.jdo.PersistenceManager getPersistenceManager()
              An Extent is managed by a PersistenceManager; this method gives access to the owning PersistenceManager.
     boolean hasSubclasses()
              Returns whether this Extent was defined to contain subclasses.
     java.util.Iterator iterator()
              Execute a read all query and return a scrollable cursor.
     

    Constructor Detail
    Method Detail

    getCandidateClass

    public java.lang.Class getCandidateClass()
    An Extent contains all instances of a particular Class in the data store; this method returns the Class of the instances
    Returns:
    the Class of instances of this Extent

    getPersistenceManager

    public oracle.toplink.jdo.PersistenceManager getPersistenceManager()
    An Extent is managed by a PersistenceManager; this method gives access to the owning PersistenceManager.
    Returns:
    the owning PersistenceManager

    hasSubclasses

    public boolean hasSubclasses()
    Returns whether this Extent was defined to contain subclasses.
    Returns:
    true if this Extent was defined to contain instances that are of a subclass type

    close

    public void close(java.util.Iterator iterator)
    Close an Iterator 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.setExtent, and to get an Iterator.
    Parameters:
    it - 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.setExtent, and to get an Iterator.

    getManager

    public JDOPersistenceManager getManager()
    Return the JDOPersistenceManager.

    getOpenCursors

    public java.util.Set getOpenCursors()
    Return the open scrollable cursors on this extent.

    iterator

    public java.util.Iterator iterator()
    Execute a read all query and return a scrollable cursor.

    JDO:

    Returns an iterator over all the instances in the Extent.

    Returns:
    an iterator over all instances in the Extent