org.geotools.jdbc
Class JDBCJoiningFeatureReader

Object
  extended by JDBCFeatureReader
      extended by JDBCJoiningFeatureReader
All Implemented Interfaces:
Closeable, FeatureReader<SimpleFeatureType,SimpleFeature>

public class JDBCJoiningFeatureReader
extends JDBCFeatureReader

Feature reader that wraps multiple feature readers in a join query.

Author:
Justin Deoliveira, OpenGeo

Nested Class Summary
 
Nested classes/interfaces inherited from class JDBCFeatureReader
JDBCFeatureReader.ResultSetFeature
 
Field Summary
 
Fields inherited from class JDBCFeatureReader
builder, columnNames, cx, dataStore, featureSource, featureType, geometryFactory, hints, LOGGER, next, offset, pkey, rs, st, TRACE_ENABLED, tracer, tx
 
Constructor Summary
JDBCJoiningFeatureReader(PreparedStatement st, Connection cx, JDBCFeatureSource featureSource, SimpleFeatureType featureType, JoinInfo join, Hints hints)
           
JDBCJoiningFeatureReader(String sql, Connection cx, JDBCFeatureSource featureSource, SimpleFeatureType featureType, JoinInfo join, Hints hints)
           
 
Method Summary
 void close()
          Release the underlying resources associated with this stream.
 boolean hasNext()
          Query whether this FeatureReader has another Feature.
 SimpleFeature next()
          Reads the next Feature in the FeatureReader.
 
Methods inherited from class JDBCFeatureReader
cleanup, ensureNext, ensureOpen, finalize, getFeatureType, getPrimaryKey, init, setNext
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCJoiningFeatureReader

public JDBCJoiningFeatureReader(String sql,
                                Connection cx,
                                JDBCFeatureSource featureSource,
                                SimpleFeatureType featureType,
                                JoinInfo join,
                                Hints hints)
                         throws SQLException,
                                IOException
Throws:
SQLException
IOException

JDBCJoiningFeatureReader

public JDBCJoiningFeatureReader(PreparedStatement st,
                                Connection cx,
                                JDBCFeatureSource featureSource,
                                SimpleFeatureType featureType,
                                JoinInfo join,
                                Hints hints)
                         throws SQLException,
                                IOException
Throws:
SQLException
IOException
Method Detail

hasNext

public boolean hasNext()
                throws IOException
Description copied from interface: FeatureReader
Query whether this FeatureReader has another Feature.

Specified by:
hasNext in interface FeatureReader<SimpleFeatureType,SimpleFeature>
Overrides:
hasNext in class JDBCFeatureReader
Returns:
True if there are more Features to be read. In other words, true if calls to next would return a feature rather than throwing an exception.
Throws:
IOException - If an error occurs determining if there are more Features.

next

public SimpleFeature next()
                   throws IOException,
                          IllegalArgumentException,
                          NoSuchElementException
Description copied from interface: FeatureReader
Reads the next Feature in the FeatureReader.

Specified by:
next in interface FeatureReader<SimpleFeatureType,SimpleFeature>
Overrides:
next in class JDBCFeatureReader
Returns:
The next feature in the reader.
Throws:
IOException - If an error occurs reading the Feature.
NoSuchElementException - If there are no more Features in the Reader.
IllegalArgumentException

close

public void close()
           throws IOException
Description copied from interface: FeatureReader
Release the underlying resources associated with this stream.

Specified by:
close in interface Closeable
Specified by:
close in interface FeatureReader<SimpleFeatureType,SimpleFeature>
Overrides:
close in class JDBCFeatureReader
Throws:
IOException - if an I/O error occurs


Copyright © 1996-2014 Geotools. All Rights Reserved.