Package org.apache.openjpa.kernel
Class ExtentImpl<T>
java.lang.Object
org.apache.openjpa.kernel.ExtentImpl<T>
- All Implemented Interfaces:
Extent<T>
Representation of all members of a persistent class.
- Author:
- Abe White, Patrick Linskey
-
Method Summary
Modifier and TypeMethodDescriptionvoid
closeAll()
Close all open iterators.The broker that generated the extent.The class of extent elements.Return the (mutable) fetch configuration for this extent.boolean
Whether this extent will ignore changes made in the current transaction.boolean
Whether the extent includes subclasses.iterator()
Return an iterator over the extent members.list()
Returns a list of all objects represented by this extent.void
lock()
Synchronizes on an internal lock.void
setIgnoreChanges
(boolean ignoreChanges) Whether this extent will ignore changes made in the current transaction.void
unlock()
Release the internal lock.
-
Method Details
-
getFetchConfiguration
Description copied from interface:Extent
Return the (mutable) fetch configuration for this extent.- Specified by:
getFetchConfiguration
in interfaceExtent<T>
-
getIgnoreChanges
public boolean getIgnoreChanges()Description copied from interface:Extent
Whether this extent will ignore changes made in the current transaction.- Specified by:
getIgnoreChanges
in interfaceExtent<T>
-
setIgnoreChanges
public void setIgnoreChanges(boolean ignoreChanges) Description copied from interface:Extent
Whether this extent will ignore changes made in the current transaction.- Specified by:
setIgnoreChanges
in interfaceExtent<T>
-
list
Description copied from interface:Extent
Returns a list of all objects represented by this extent. This method creates aList
by traversing the entire iterator returned by a call toExtent.iterator()
. This means thatCollection.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. -
iterator
Description copied from interface:Extent
Return an iterator over the extent members. -
getBroker
Description copied from interface:Extent
The broker that generated the extent. -
getElementType
Description copied from interface:Extent
The class of extent elements.- Specified by:
getElementType
in interfaceExtent<T>
-
hasSubclasses
public boolean hasSubclasses()Description copied from interface:Extent
Whether the extent includes subclasses.- Specified by:
hasSubclasses
in interfaceExtent<T>
-
closeAll
public void closeAll()Description copied from interface:Extent
Close all open iterators. -
lock
public void lock()Description copied from interface:Extent
Synchronizes on an internal lock. -
unlock
public void unlock()Description copied from interface:Extent
Release the internal lock.
-