| java.lang.Object org.geotools.data.jdbc.QueryData
QueryData | public class QueryData implements AttributeReader,AttributeWriter(Code) | | QueryData holds the ResultSet obtained from the sql query and has the following responsibilities:
- acts as the attribute reader by using the AttributeIO objects
- acts as the attribute writer by using the AttributeIO objects
- manages the resulset, statement and transaction and closes them cleanly if needed
- provides methods for creating a new row, as well as inserting new ones, that are used by the
JDBCFeatureWriter
- holds the FIDMapper for feature reader and writer to use when building new features
author: aaime |
Constructor Summary | |
public | QueryData(FeatureTypeInfo featureTypeInfo, JDBC1DataStore parentDataStore, Connection connection, Statement statement, ResultSet resultSet, Transaction transaction) Creates a new QueryData object. | public | QueryData(FeatureTypeInfo featureTypeInfo, JDBC1DataStore parentDataStore, Connection connection, Statement statement, ResultSet resultSet, Transaction transaction, Hints hints) Creates a new QueryData object. |
LOGGER | final protected static Logger LOGGER(Code) | | The logger for the data module.
|
baseIndex | protected int baseIndex(Code) | | |
hasNextCalled | boolean hasNextCalled(Code) | | |
lastNext | boolean lastNext(Code) | | |
close | public void close(SQLException sqlException)(Code) | | Closes the JDBC objects associated to the queryData and reports the sqlException on the LOG
Parameters: sqlException - |
fireChangeRemoved | public void fireChangeRemoved(Envelope bounds, boolean isCommit)(Code) | | Call after deleteCurrentRow()
|
fireFeaturesAdded | public void fireFeaturesAdded(Envelope bounds, boolean isCommit)(Code) | | Call after doUpdate
|
fireFeaturesChanged | public void fireFeaturesChanged(Envelope bounds, boolean isCommit)(Code) | | Call after updateRow
|
getAttributeHandlers | public AttributeIO[] getAttributeHandlers()(Code) | | Returns the AttributeIO objects used to parse and encode the column values stored in the
database
|
getFeatureType | public FeatureType getFeatureType()(Code) | | Returns the current feature type
|
getMapper | public FIDMapper getMapper()(Code) | | Returns the FID mapper to be used when reading/writing features
|
getTransaction | public Transaction getTransaction()(Code) | | Returns the current transation
|
isClosed | public boolean isClosed()(Code) | | true if the QueryData has been closed, false otherwise |
readFidColumn | public Object readFidColumn(int index) throws IOException(Code) | | Reads a column of the primary key
Parameters: index - the column index among the primary key columns (as reported by the FIDMapper) fid value throws: IOException - throws: DataSourceException - |
startInsert | public void startInsert() throws SQLException(Code) | | Moves the result set to the insert row. Must be called before writing the attribute values
for the new Feature
throws: SQLException - |
writeFidColumn | public void writeFidColumn(int index, Object value) throws IOException(Code) | | Writes a column of the primary key
Parameters: index - the FID column index among the primary key columns (as reported by the FIDMapper) Parameters: value - the column value throws: IOException - throws: DataSourceException - |
|
|