Chapter 10. Extent
Prev | Part II. Java Data Objects | Next

## Chapter 10. Extent

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`.

The `Extent` interface is straightforward. The `getCandidateClass` method returns the persistence-capable class of the `Extent`'s instances. The `hasSubclasses` method indicates whether instances of subclasses are also included.

You can obtain an iterator over every object in an `Extent` using the `iterator` method. The iterators used by some implementations might consume data store 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 you can close all open iterators at once with `closeAll`.

Prev | Up | Next
9.2. The JDO Transaction Interface | Home | Chapter 11. Query