javax.jdo
Interface Extent
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:
- to iterate all instances of a particular class
- to execute a
Query in the data store over all instances
of a particular class
void | close(Iterator it)- Close an
Iterator associated with this Extent instance.
|
void | closeAll()- Close all
Iterators associated with this Extent instance.
|
Class | getCandidateClass()- An
Extent contains all instances of a particular class in the data
store; this method returns the Class of the instances.
|
FetchPlan | getFetchPlan()- Get the fetch plan associated with this Extent.
|
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.
|
Iterator | iterator()- Returns an iterator over all the instances in the
Extent.
|
close
public void close(Iterator it)
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.
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.
getCandidateClass
public Class getCandidateClass()
An Extent contains all instances of a particular class in the data
store; this method returns the Class of the instances.
- the
Class of instances of this Extent.
getFetchPlan
public FetchPlan getFetchPlan()
Get the fetch plan associated with this Extent.
getPersistenceManager
public PersistenceManager getPersistenceManager()
An Extent is managed by a PersistenceManager;
this method gives access to the owning PersistenceManager.
- the owning
PersistenceManager
hasSubclasses
public boolean hasSubclasses()
Returns whether this Extent was defined to contain subclasses.
- true if this
Extent was defined to contain instances
that are of a subclass type.
iterator
public Iterator iterator()
Returns an iterator over all the instances in the Extent.
The behavior of the returned iterator might depend on the setting of the
ignoreCache flag in the owning PersistenceManager.
- an iterator over all instances in the
Extent