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

org.deegree.feature.persistence.query
Class CombinedResultSet

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

public class CombinedResultSet
extends Object
implements FeatureResultSet

ResultSet that encapsulates a sequence of ResultSets.

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

Field Summary
(package private)  FeatureResultSet currentResultSet
           
(package private)  boolean lastClosed
           
(package private)  Iterator<FeatureResultSet> resultSetIter
           
 
Constructor Summary
CombinedResultSet(Iterator<FeatureResultSet> resultSetIter)
          Creates a new CombinedResultSet that is backed by the given FeatureResultSet.
 
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
 

Field Detail

resultSetIter

Iterator<FeatureResultSet> resultSetIter

currentResultSet

FeatureResultSet currentResultSet

lastClosed

boolean lastClosed
Constructor Detail

CombinedResultSet

public CombinedResultSet(Iterator<FeatureResultSet> resultSetIter)
Creates a new CombinedResultSet that is backed by the given FeatureResultSet.

Parameters:
resultSetIter - FeatureResultSet to back the result set, must not be null
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

]]>