Interface Extent<E>
- All Superinterfaces:
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:
- to iterate all instances of a particular class or interface
- to execute a
Queryin the data store over all instances of a particular class or interface
- Version:
- 2.1
-
Method Summary
Modifier and TypeMethodDescriptionvoidClose anIteratorassociated with thisExtentinstance.voidcloseAll()Close allIterators associated with thisExtentinstance.AnExtentcontains all instances of a particular class or interface in the data store; this method returns theClassof the instances represented by this Extent.Get the fetch plan associated with this Extent.AnExtentis managed by aPersistenceManager; this method gives access to the owningPersistenceManager.booleanReturns whether thisExtentwas defined to contain subclasses.iterator()Returns an iterator over all the instances in theExtent.Methods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
iterator
Returns an iterator over all the instances in theExtent. The behavior of the returned iterator might depend on the setting of theignoreCacheflag in the owningPersistenceManager. -
hasSubclasses
boolean hasSubclasses()Returns whether thisExtentwas defined to contain subclasses.- Returns:
- true if this
Extentwas defined to contain instances that are of a subclass type.
-
getCandidateClass
-
getPersistenceManager
PersistenceManager getPersistenceManager()AnExtentis managed by aPersistenceManager; this method gives access to the owningPersistenceManager.- Returns:
- the owning
PersistenceManager
-
closeAll
void closeAll()Close allIterators associated with thisExtentinstance.Iterators closed by this method will returnfalsetohasNext()and will throwNoSuchElementExceptiononnext(). TheExtentinstance can still be used as a parameter ofQuery.setExtent, and to get anIterator. -
close
Close anIteratorassociated with thisExtentinstance.Iterators closed by this method will returnfalsetohasNext()and will throwNoSuchElementExceptiononnext(). TheExtentinstance can still be used as a parameter ofQuery.setExtent, and to get anIterator.- Parameters:
it- anIteratorobtained by the methoditerator()on thisExtentinstance.
-
getFetchPlan
FetchPlan getFetchPlan()Get the fetch plan associated with this Extent.- Returns:
- the fetch plan
- Since:
- 2.0
-