An Extent
is a logical view of all persistent
instances of a given persistence-capable class, possibly including
subclasses. Extent
s are obtained from
PersistenceManager
s, and are usually used to
specify the candidate objects to a Query
.
Note | |
---|---|
Kodo extends the standard |
public Class getCandidateClass (); public boolean hasSubclasses ();
The getCandidateClass
method returns the
persistence-capable class of the Extent
's
instances. The hasSubclasses
method indicates
whether instances of subclasses are part of the Extent
as well.
public FetchPlan getFetchPlan ();
Before iterating an Extent
, you may want to use
the FetchPlan
to optimize which fields
and relations of the returned objects will be loaded, and to configure
result scrolling. See Chapter 12, FetchPlan for
details on the FetchPlan
interface.
When you create an Extent
with
PersistenceManager.getExtent
, the
Extent
's FetchPlan
is initialized
to the same values as the plan of its owning
PersistenceManager
. Subsequent changes to the
Extent
's FetchPlan
,
however, will not affect the PersistenceManager
's
plan.
public Iterator iterator (); public void close (Iterator itr); public void closeAll ();
You can obtain an iterator over every object in an
Extent
using the
iterator
method. The iterators used by some
implementations might consume datastore resources; therefore, you
should always close an Extent
's iterators as
soon as you are done with them. You can close an individual iterator
by passing it to the close
method, or all open
iterators at once with closeAll
.
Note | |
---|---|
Kodo may use scrollable
JDBC |