|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectJDBCFeatureReader
JDBCInsertFeatureWriter
public class JDBCInsertFeatureWriter
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 | |
---|---|
JDBCInsertFeatureWriter(JDBCUpdateFeatureWriter other)
|
|
JDBCInsertFeatureWriter(PreparedStatement ps,
Connection cx,
JDBCFeatureSource featureSource,
Hints hints)
|
|
JDBCInsertFeatureWriter(String sql,
Connection cx,
JDBCFeatureSource featureSource,
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. |
void |
remove()
Removes current Feature, must be called before hasNext. |
void |
write()
Writes the current Feature, must be called before hasNext. |
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 |
Methods inherited from interface FeatureWriter |
---|
getFeatureType |
Constructor Detail |
---|
public JDBCInsertFeatureWriter(String sql, Connection cx, JDBCFeatureSource featureSource, Hints hints) throws SQLException, IOException
SQLException
IOException
public JDBCInsertFeatureWriter(PreparedStatement ps, Connection cx, JDBCFeatureSource featureSource, Hints hints) throws SQLException, IOException
SQLException
IOException
public JDBCInsertFeatureWriter(JDBCUpdateFeatureWriter other)
Method Detail |
---|
public boolean hasNext() throws IOException
FeatureReader
hasNext
in interface FeatureReader<SimpleFeatureType,SimpleFeature>
hasNext
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
hasNext
in class JDBCFeatureReader
IOException
- If an error occurs determining if there are more
Features.public SimpleFeature next() throws IOException
FeatureReader
next
in interface FeatureReader<SimpleFeatureType,SimpleFeature>
next
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
next
in class JDBCFeatureReader
IOException
- If an error occurs reading the Feature.public void remove() throws IOException
FeatureWriter
FeatureWriters will need to allow all FeatureSources of the same
typeName to issue a FeatureEvent event of type
FeatureEvent.FEATURES_REMOVED
when this method is called.
If this FeatureWriter is opperating against a Transaction FEATURES_REMOVED events should only be sent to FeatureSources operating on the same Transaction. When Transaction commit() is called other FeatureSources will be informed of the modifications.
When the current Feature has been provided as new content, this method "cancels" the add opperation (and notification needed).
remove
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
IOException
- DOCUMENT ME!public void write() throws IOException
FeatureWriter
FeautreWriters will need to allow FeatureSources of the same typeName to issue a FeatureEvent:
false
.
true
and the resulting Feature has indeed been
modified.
If this FeatureWriter is opperating against a Transaction the FEATURES_MODIFIED or FEATURES_ADDED events should only be sent to FeatureSources opperating on the same Transaction. When Transaction commit() is called other FeatureSources will be informed of the modifications.
If you have not called write() when you call hasNext() or next(), no modification will occur().
write
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
IOException
public void close() throws IOException
FeatureReader
close
in interface Closeable
close
in interface FeatureReader<SimpleFeatureType,SimpleFeature>
close
in interface FeatureWriter<SimpleFeatureType,SimpleFeature>
close
in class JDBCFeatureReader
IOException
- if an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |