Package org.apache.openjpa.kernel
Interface Extent<T>
- All Known Implementing Classes:
DelegatingExtent,ExtentImpl
public interface Extent<T>
Representation of all members of a persistent class.
- Author:
- Abe White, Patrick Linskey
-
Method Summary
Modifier and TypeMethodDescriptionvoidcloseAll()Close all open iterators.The broker that generated the extent.The class of extent elements.Return the (mutable) fetch configuration for this extent.booleanWhether this extent will ignore changes made in the current transaction.booleanWhether the extent includes subclasses.iterator()Return an iterator over the extent members.list()Returns a list of all objects represented by this extent.voidlock()Synchronizes on an internal lock.voidsetIgnoreChanges(boolean ignoreChanges) Whether this extent will ignore changes made in the current transaction.voidunlock()Release the internal lock.
-
Method Details
-
getFetchConfiguration
FetchConfiguration getFetchConfiguration()Return the (mutable) fetch configuration for this extent. -
getIgnoreChanges
boolean getIgnoreChanges()Whether this extent will ignore changes made in the current transaction. -
setIgnoreChanges
void setIgnoreChanges(boolean ignoreChanges) Whether this extent will ignore changes made in the current transaction. -
list
Returns a list of all objects represented by this extent. This method creates aListby traversing the entire iterator returned by a call toiterator(). 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
Return an iterator over the extent members. -
getBroker
Broker getBroker()The broker that generated the extent. -
getElementType
The class of extent elements. -
hasSubclasses
boolean hasSubclasses()Whether the extent includes subclasses. -
closeAll
void closeAll()Close all open iterators. -
lock
void lock()Synchronizes on an internal lock. -
unlock
void unlock()Release the internal lock.
-