org.apache.openjpa.persistence
Class Extent<T>

java.lang.Object
  extended by org.apache.openjpa.persistence.Extent<T>
All Implemented Interfaces:
java.lang.Iterable

public class Extent<T>
extends java.lang.Object
implements java.lang.Iterable

An extent is a logical view of all instances of a class.

Author:
Abe White

Constructor Summary
Extent(EntityManagerImpl em, org.apache.openjpa.kernel.Extent extent)
          Constructor; supply delegate.
 
Method Summary
 void closeAll()
          Close all open iterators that are consuming database resources.
 boolean equals(java.lang.Object other)
           
 org.apache.openjpa.kernel.Extent getDelegate()
          Delegate.
 java.lang.Class<T> getElementClass()
          The extent's element type.
 OpenJPAEntityManager getEntityManager()
          The owning entity manager.
 FetchPlan getFetchPlan()
          Fetch configuration for controlling how iterated objects are loaded.
 boolean getIgnoreChanges()
          Whether the extent sees inserts and deletes in the current transaction.
 int hashCode()
           
 boolean hasSubclasses()
          Whether the extent includes subclasses.
 java.util.Iterator<T> iterator()
          Iterator over contents.
 java.util.List<T> list()
          List the extent contents.
 void setIgnoreChanges(boolean ignoreChanges)
          Whether the extent sees inserts and deletes in the current transaction.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Extent

public Extent(EntityManagerImpl em,
              org.apache.openjpa.kernel.Extent extent)
Constructor; supply delegate.

Method Detail

getDelegate

public org.apache.openjpa.kernel.Extent getDelegate()
Delegate.


getElementClass

public java.lang.Class<T> getElementClass()
The extent's element type.


hasSubclasses

public boolean hasSubclasses()
Whether the extent includes subclasses.


getEntityManager

public OpenJPAEntityManager getEntityManager()
The owning entity manager.


getFetchPlan

public FetchPlan getFetchPlan()
Fetch configuration for controlling how iterated objects are loaded.


getIgnoreChanges

public boolean getIgnoreChanges()
Whether the extent sees inserts and deletes in the current transaction.


setIgnoreChanges

public void setIgnoreChanges(boolean ignoreChanges)
Whether the extent sees inserts and deletes in the current transaction.


list

public java.util.List<T> list()
List the extent contents.


iterator

public java.util.Iterator<T> iterator()
Iterator over contents.

Specified by:
iterator in interface java.lang.Iterable

closeAll

public void closeAll()
Close all open iterators that are consuming database resources.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object


Copyright © 2006 Apache Software Foundation. All Rights Reserved.