366 words
javax.jdo.Extent - JDO interface
javax.jdo
Interface Extent<E>
- Superinterfaces:
Iterable<E>
Instances of the
Extent class represent the entire collection
of instances in the data store of the candidate class or interface
possibly including its subclasses or subinterfaces.
The Extent instance has two possible uses:
- to iterate all instances of a particular class or interface
- to execute a
Queryin the data store over all instances of a particular class or interface
- Since:
- JDO 1.0
void close(Iterator<E> 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.- Parameters:
it- anIteratorobtained by the methoditerator()on thisExtentinstance.
- Since:
- JDO 1.0
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.- Since:
- JDO 1.0
Class<E> getCandidateClass()
An
Extent contains all instances of a particular class
or interface in the data
store; this method returns the Class of the instances
represented by this Extent.- Returns:
- the
Classof instances of thisExtent.
- Since:
- JDO 1.0
Get the fetch plan associated with this Extent.
- Returns:
- the fetch plan
- Since:
- JDO 2.0
An
Extent is managed by a PersistenceManager;
this method gives access to the owning PersistenceManager.- Returns:
- the owning
PersistenceManager
- Since:
- JDO 1.0
boolean hasSubclasses()
Returns whether this
Extent was defined to contain subclasses.- Returns:
- true if this
Extentwas defined to contain instances that are of a subclass type.
- Since:
- JDO 1.0
Iterator<E> 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.- Returns:
- an iterator over all instances in the
Extent
- Since:
- JDO 1.0
Iterator<T> iterator()
This documentation page is derived (with some adjustments) from the JDO 2.2 API
and is available under the terms of the Apache License, v. 2.0.