deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.feature.persistence.query
Class CachedFeatureResultSet

java.lang.Object
  extended by org.deegree.feature.persistence.query.CachedFeatureResultSet
All Implemented Interfaces:
Iterable<Feature>, FeatureResultSet

public class CachedFeatureResultSet
extends Object
implements FeatureResultSet

FeatureResultSet backed by a FeatureCollection

Version:
$Revision: 22129 $, $Date: 2010-01-21 19:03:13 +0100 (Do, 21 Jan 2010) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
CachedFeatureResultSet(FeatureCollection fc)
          Creates a new CachedFeatureResultSet that is backed by the given FeatureCollection.
 
Method Summary
 void close()
          Must be invoked after using to close underlying resources, e.g.
 Iterator<Feature> iterator()
           
 FeatureCollection toCollection()
          Returns all members of the FeatureResultSet as a FeatureCollection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedFeatureResultSet

public CachedFeatureResultSet(FeatureCollection fc)
Creates a new CachedFeatureResultSet that is backed by the given FeatureCollection.

Parameters:
fc - FeatureCollection to back the result set
Method Detail

close

public void close()
Description copied from interface: FeatureResultSet
Must be invoked after using to close underlying resources, e.g. SQL ResultSets.

Specified by:
close in interface FeatureResultSet

toCollection

public FeatureCollection toCollection()
Description copied from interface: FeatureResultSet
Returns all members of the FeatureResultSet as a FeatureCollection.

NOTE: This method should not be called for very large result sets, as it introduces the overhead of keeping all created feature instances in memory. The returned collection will contain all Features instances from the current position in the iteration sequence.

Specified by:
toCollection in interface FeatureResultSet
Returns:
members as feature collection, never null

iterator

public Iterator<Feature> iterator()
Specified by:
iterator in interface Iterable<Feature>

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>