com.solarmetric.kodo.runtime
Class ExtentImpl
java.lang.Object
|
+--com.solarmetric.kodo.runtime.ExtentImpl
- All Implemented Interfaces:
- Extent
- public abstract class ExtentImpl
- extends Object
- implements Extent
Abstract Extent implementation that takes care of everything
but creating and closing iterators.
- Author:
- Abe White, Patrick Linskey
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtentImpl
public ExtentImpl(PersistenceManager pm,
Class type,
boolean subs)
- Constructor.
- Parameters:
pm - the owning persistence managertype - the candidate classsubs - whether subclasses are included in the extent
list
public List list()
- API extension. Returns a list of all objects represented by
this extent.
This method creates a List by traversing the
entire iterator returned by a call to 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.
iterator
public Iterator iterator()
- Specified by:
iterator in interface Extent
getPersistenceManager
public PersistenceManager getPersistenceManager()
- Specified by:
getPersistenceManager in interface Extent
getCandidateClass
public Class getCandidateClass()
- Specified by:
getCandidateClass in interface Extent
hasSubclasses
public boolean hasSubclasses()
- Specified by:
hasSubclasses in interface Extent
closeAll
public void closeAll()
- Specified by:
closeAll in interface Extent
close
public void close(Iterator iter)
- Specified by:
close in interface Extent
getIterator
protected abstract Iterator getIterator()
- Return an iterator over this extent.
closeIterator
protected void closeIterator(Iterator iter)
- Close the given iterator. Does nothing by default.
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.