|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectJDBCFeatureReader
public class JDBCFeatureReader
Reader for jdbc datastore
Nested Class Summary | |
---|---|
protected class |
JDBCFeatureReader.ResultSetFeature
Feature wrapper around a result set. |
Field Summary | |
---|---|
protected SimpleFeatureBuilder |
builder
feature builder |
protected String[] |
columnNames
|
protected Connection |
cx
|
protected JDBCDataStore |
dataStore
the datastore |
protected JDBCFeatureSource |
featureSource
The feature source the reader originated from. |
protected SimpleFeatureType |
featureType
schema of features |
protected GeometryFactory |
geometryFactory
geometry factory used to create geometry objects |
protected Hints |
hints
hints |
protected static Logger |
LOGGER
|
protected Boolean |
next
flag indicating if the iterator has another feature |
protected int |
offset
offset/column index to start reading from result set |
protected PrimaryKey |
pkey
The primary key |
protected ResultSet |
rs
|
protected Statement |
st
statement,result set that is being worked from. |
protected static Boolean |
TRACE_ENABLED
When true, the stack trace that created a reader that wasn't closed is recorded and then printed out when warning the user about this. |
protected Exception |
tracer
|
protected Transaction |
tx
current transaction |
Constructor Summary | |
---|---|
JDBCFeatureReader(JDBCFeatureReader other)
|
|
JDBCFeatureReader(PreparedStatement st,
Connection cx,
JDBCFeatureSource featureSource,
SimpleFeatureType featureType,
Hints hints)
|
|
JDBCFeatureReader(ResultSet rs,
Connection cx,
int offset,
JDBCFeatureSource featureSource,
SimpleFeatureType featureType,
Hints hints)
|
|
JDBCFeatureReader(String sql,
Connection cx,
JDBCFeatureSource featureSource,
SimpleFeatureType featureType,
Hints hints)
|
Method Summary | |
---|---|
protected void |
cleanup()
Cleans up the reader state without closing the accessory resultset, statement and connection. |
void |
close()
Release the underlying resources associated with this stream. |
protected void |
ensureNext()
|
protected void |
ensureOpen()
|
protected void |
finalize()
|
SimpleFeatureType |
getFeatureType()
Return the FeatureType this reader has been configured to create. |
PrimaryKey |
getPrimaryKey()
|
boolean |
hasNext()
Query whether this FeatureReader has another Feature. |
protected void |
init(JDBCFeatureSource featureSource,
SimpleFeatureType featureType,
Hints hints)
|
SimpleFeature |
next()
Reads the next Feature in the FeatureReader. |
void |
setNext(Boolean next)
|
Methods inherited from class Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger LOGGER
protected static final Boolean TRACE_ENABLED
protected JDBCFeatureSource featureSource
protected JDBCDataStore dataStore
protected SimpleFeatureType featureType
protected GeometryFactory geometryFactory
protected Hints hints
protected Transaction tx
protected Boolean next
protected SimpleFeatureBuilder builder
protected PrimaryKey pkey
protected Statement st
protected ResultSet rs
protected Connection cx
protected Exception tracer
protected String[] columnNames
protected int offset
Constructor Detail |
---|
public JDBCFeatureReader(String sql, Connection cx, JDBCFeatureSource featureSource, SimpleFeatureType featureType, Hints hints) throws SQLException
SQLException
public JDBCFeatureReader(PreparedStatement st, Connection cx, JDBCFeatureSource featureSource, SimpleFeatureType featureType, Hints hints) throws SQLException
SQLException
public JDBCFeatureReader(ResultSet rs, Connection cx, int offset, JDBCFeatureSource featureSource, SimpleFeatureType featureType, Hints hints) throws SQLException
SQLException
public JDBCFeatureReader(JDBCFeatureReader other)
Method Detail |
---|
protected void init(JDBCFeatureSource featureSource, SimpleFeatureType featureType, Hints hints)
public void setNext(Boolean next)
public SimpleFeatureType getFeatureType()
FeatureReader
getFeatureType
in interface FeatureReader<SimpleFeatureType,SimpleFeature>
public PrimaryKey getPrimaryKey()
public boolean hasNext() throws IOException
FeatureReader
hasNext
in interface FeatureReader<SimpleFeatureType,SimpleFeature>
IOException
- If an error occurs determining if there are more
Features.protected void ensureNext()
protected void ensureOpen() throws IOException
IOException
public SimpleFeature next() throws IOException, IllegalArgumentException, NoSuchElementException
FeatureReader
next
in interface FeatureReader<SimpleFeatureType,SimpleFeature>
IOException
- If an error occurs reading the Feature.
NoSuchElementException
- If there are no more Features in the
Reader.
IllegalArgumentException
public void close() throws IOException
FeatureReader
close
in interface Closeable
close
in interface FeatureReader<SimpleFeatureType,SimpleFeature>
IOException
- if an I/O error occursprotected void cleanup()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |