Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.jdo
Interface Extent<E>

All Superinterfaces:
  java.lang.Iterable<E>

    public interface Extent<E>

extends java.lang.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:

1. to iterate all instances of a particular class or interface
2. to execute a `Query` in the data store over all instances of a particular class or interface

Version:
  2.1

Method Summary
`void` | `close(java.util.Iterator<E> it)` Close an `Iterator` associated with this `Extent` instance.
`void` | `closeAll()` Close all `Iterator`s associated with this `Extent` instance.
`java.lang.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.
`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.
`java.util.Iterator<E>` | `iterator()` Returns an iterator over all the instances in the `Extent`.

Method Detail

### iterator

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

  Specified by:
    `iterator` in interface `java.lang.Iterable<E>`
  Returns:
    an iterator over all instances in the `Extent`

### hasSubclasses

    boolean hasSubclasses()

  Returns whether this `Extent` was defined to contain subclasses.

  Returns:
    true if this `Extent` was defined to contain instances that are of a subclass type.

### getCandidateClass

    java.lang.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 `Class` of instances of this `Extent`.

### getPersistenceManager

    PersistenceManager getPersistenceManager()

  An `Extent` is managed by a `PersistenceManager`; this method gives access to the owning `PersistenceManager`.

  Returns:
    the owning `PersistenceManager`

### closeAll

    void closeAll()

  Close all `Iterator`s associated with this `Extent` instance. `Iterator`s 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`.

### close

    void close(java.util.Iterator<E> it)

  Close an `Iterator` associated with this `Extent` instance. `Iterator`s 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` - an `Iterator` obtained by the method `iterator()` on this `Extent` instance.

### getFetchPlan

    FetchPlan getFetchPlan()

  Get the fetch plan associated with this Extent.

  Returns:
    the fetch plan
  Since:
    2.0

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.