|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.kernel.DelegatingExtent<T>
public class DelegatingExtent<T>
Delegating extent that also can perform exception translation for use in facades.
Constructor Summary | |
---|---|
DelegatingExtent(Extent<T> extent)
Constructor; supply delegate. |
|
DelegatingExtent(Extent<T> extent,
RuntimeExceptionTranslator trans)
Constructor; supply delegate and exception translator. |
Method Summary | |
---|---|
void |
closeAll()
Close all open iterators. |
boolean |
equals(Object other)
|
Broker |
getBroker()
The broker that generated the extent. |
Extent<T> |
getDelegate()
Return the direct delegate. |
Class<T> |
getElementType()
The class of extent elements. |
FetchConfiguration |
getFetchConfiguration()
Return the (mutable) fetch configuration for this extent. |
boolean |
getIgnoreChanges()
Whether this extent will ignore changes made in the current transaction. |
Extent<T> |
getInnermostDelegate()
Return the native delegate. |
int |
hashCode()
|
boolean |
hasSubclasses()
Whether the extent includes subclasses. |
Iterator<T> |
iterator()
Return an iterator over the extent members. |
List<T> |
list()
Returns a list of all objects represented by this extent. |
void |
lock()
Synchronizes on an internal lock. |
void |
setIgnoreChanges(boolean ignoreCache)
Whether this extent will ignore changes made in the current transaction. |
protected RuntimeException |
translate(RuntimeException re)
Translate the OpenJPA exception. |
void |
unlock()
Release the internal lock. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelegatingExtent(Extent<T> extent)
public DelegatingExtent(Extent<T> extent, RuntimeExceptionTranslator trans)
Method Detail |
---|
public Extent<T> getDelegate()
public Extent<T> getInnermostDelegate()
public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
equals
in class Object
protected RuntimeException translate(RuntimeException re)
public Class<T> getElementType()
Extent
getElementType
in interface Extent<T>
public boolean hasSubclasses()
Extent
hasSubclasses
in interface Extent<T>
public Broker getBroker()
Extent
getBroker
in interface Extent<T>
public FetchConfiguration getFetchConfiguration()
Extent
getFetchConfiguration
in interface Extent<T>
public boolean getIgnoreChanges()
Extent
getIgnoreChanges
in interface Extent<T>
public void setIgnoreChanges(boolean ignoreCache)
Extent
setIgnoreChanges
in interface Extent<T>
public List<T> list()
Extent
List
by traversing the entire iterator returned by a
call to Extent.iterator()
. This means that Collection.size()
will
work correctly, but if the extent represents a large data set, this
method may be quite slow and may consume quite a bit of memory.
list
in interface Extent<T>
public Iterator<T> iterator()
Extent
iterator
in interface Extent<T>
public void closeAll()
Extent
closeAll
in interface Extent<T>
public void lock()
Extent
lock
in interface Extent<T>
public void unlock()
Extent
unlock
in interface Extent<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |