SolarMetric Kodo JDO Enterprise Edition 2.3.1 generated on August 20 2002

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

Constructor Summary
ExtentImpl(PersistenceManager pm, Class type, boolean subs)
          Constructor.
 
Method Summary
 void close(Iterator iter)
           
 void closeAll()
           
protected  void closeIterator(Iterator iter)
          Close the given iterator.
 Class getCandidateClass()
           
protected abstract  Iterator getIterator()
          Return an iterator over this extent.
 PersistenceManager getPersistenceManager()
           
 boolean hasSubclasses()
           
 Iterator iterator()
           
 List list()
          API extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtentImpl

public ExtentImpl(PersistenceManager pm,
                  Class type,
                  boolean subs)
Constructor.
Parameters:
pm - the owning persistence manager
type - the candidate class
subs - whether subclasses are included in the extent
Method Detail

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.

SolarMetric Kodo JDO Enterprise Edition 2.3.1 generated on August 20 2002

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.