Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.jdo
Class JDOExtent

java.lang.Object
  extended byoracle.toplink.jdo.JDOExtent

All Implemented Interfaces:
javax.jdo.Extent

public class JDOExtent
extends java.lang.Object
implements javax.jdo.Extent

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

    Method Summary
    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.
    javax.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.
    Methods inherited from class java.lang.Object
    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    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
    Specified by:
    getCandidateClass in interface javax.jdo.Extent
    Returns:
    the Class of instances of this Extent

    getPersistenceManager

    public javax.jdo.PersistenceManager getPersistenceManager()
    
    An Extent is managed by a PersistenceManager; this method gives access to the owning PersistenceManager.
    Specified by:
    getPersistenceManager in interface javax.jdo.Extent
    Returns:
    the owning PersistenceManager

    hasSubclasses

    public boolean hasSubclasses()
    
    Returns whether this Extent was defined to contain subclasses.
    Specified by:
    hasSubclasses in interface javax.jdo.Extent
    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.
    Specified by:
    close in interface javax.jdo.Extent

    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.
    Specified by:
    closeAll in interface javax.jdo.Extent

    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.

    Specified by:
    iterator in interface javax.jdo.Extent
    Returns:
    an iterator over all instances in the Extent

    Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.