|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectQueryData
public class QueryData
QueryData holds the ResultSet obtained from the sql query and has the following responsibilities:
trunk/gt/modules
(gt-modules.jar
) (Maven report) (SVN head)Field Summary | |
---|---|
protected AttributeIO[] |
attributeHandlers
|
protected int |
baseIndex
|
protected Connection |
connection
|
protected FeatureTypeInfo |
featureTypeInfo
|
protected Object[] |
fidAttributes
|
protected Hints |
hints
|
protected FeatureListenerManager |
listenerManager
|
protected static Logger |
LOGGER
The logger for the data module. |
protected FIDMapper |
mapper
|
protected ResultSet |
resultSet
|
protected Statement |
statement
|
protected Transaction |
transaction
|
Constructor Summary | |
---|---|
QueryData(FeatureTypeInfo featureTypeInfo,
JDBC1DataStore parentDataStore,
Connection connection,
Statement statement,
ResultSet resultSet,
Transaction transaction)
Creates a new QueryData object. |
|
QueryData(FeatureTypeInfo featureTypeInfo,
JDBC1DataStore parentDataStore,
Connection connection,
Statement statement,
ResultSet resultSet,
Transaction transaction,
Hints hints)
Creates a new QueryData object. |
Method Summary | |
---|---|
void |
close()
Release any resources associated with this reader |
void |
close(SQLException sqlException)
Closes the JDBC objects associated to the queryData and reports the sqlException on the LOG |
void |
deleteCurrentRow()
Deletes the current record in the result set |
void |
doInsert()
Insert a record in the current result set |
protected void |
finalize()
|
void |
fireChangeRemoved(ReferencedEnvelope bounds,
boolean isCommit)
Call after deleteCurrentRow() |
void |
fireFeaturesAdded(ReferencedEnvelope bounds,
boolean isCommit)
Call after doUpdate |
void |
fireFeaturesChanged(ReferencedEnvelope bounds,
boolean isCommit)
Call after updateRow |
int |
getAttributeCount()
The number of attributes this reader can read, i.e the length of a row. |
AttributeIO[] |
getAttributeHandlers()
Returns the AttributeIO objects used to parse and encode the column values stored in the database |
AttributeDescriptor |
getAttributeType(int index)
Retrieve the AttributeType at the given index. |
Connection |
getConnection()
DOCUMENT ME! |
SimpleFeatureType |
getFeatureType()
Returns the current feature type |
FeatureTypeInfo |
getFeatureTypeInfo()
DOCUMENT ME! |
Hints |
getHints()
|
FeatureListenerManager |
getListenerManager()
|
FIDMapper |
getMapper()
Returns the FID mapper to be used when reading/writing features |
Transaction |
getTransaction()
Returns the current transation |
boolean |
hasNext()
Does another set of attributes exist in this reader? |
boolean |
isClosed()
|
void |
next()
Advance the reader to the next set of attributes. |
Object |
read(int index)
Read the attribute at the given index. |
Object |
readFidColumn(int index)
Reads a column of the primary key |
void |
startInsert()
Moves the result set to the insert row. |
void |
updateRow()
Update the current record |
void |
write(int i,
Object currAtt)
Write the given attribute value at the position indicated. |
void |
writeFidColumn(int index,
Object value)
Writes a column of the primary key |
Methods inherited from class Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger LOGGER
protected Object[] fidAttributes
protected FeatureTypeInfo featureTypeInfo
protected ResultSet resultSet
protected Connection connection
protected Transaction transaction
protected Statement statement
protected FIDMapper mapper
protected AttributeIO[] attributeHandlers
protected int baseIndex
protected FeatureListenerManager listenerManager
protected Hints hints
Constructor Detail |
---|
public QueryData(FeatureTypeInfo featureTypeInfo, JDBC1DataStore parentDataStore, Connection connection, Statement statement, ResultSet resultSet, Transaction transaction) throws IOException
featureTypeInfo
- parentDataStore
- connection
- statement
- resultSet
- transaction
-
IOException
public QueryData(FeatureTypeInfo featureTypeInfo, JDBC1DataStore parentDataStore, Connection connection, Statement statement, ResultSet resultSet, Transaction transaction, Hints hints) throws IOException
featureTypeInfo
- parentDataStore
- connection
- statement
- resultSet
- transaction
-
IOException
Method Detail |
---|
public int getAttributeCount()
AttributeReader
getAttributeCount
in interface AttributeReader
getAttributeCount
in interface AttributeWriter
AttributeWriter.getAttributeCount()
public AttributeIO[] getAttributeHandlers()
public Connection getConnection()
public FIDMapper getMapper()
public Transaction getTransaction()
public void close()
AttributeReader
close
in interface AttributeReader
close
in interface AttributeWriter
AttributeWriter.close()
public void close(SQLException sqlException)
sqlException
- public Object read(int index) throws IOException, ArrayIndexOutOfBoundsException
AttributeReader
read
in interface AttributeReader
IOException
ArrayIndexOutOfBoundsException
AttributeReader.read(int)
public void write(int i, Object currAtt) throws IOException
AttributeWriter
write
in interface AttributeWriter
IOException
AttributeWriter.write(int, java.lang.Object)
public Object readFidColumn(int index) throws IOException
index
- the column index among the primary key columns (as reported by the FIDMapper)
IOException
DataSourceException
public void writeFidColumn(int index, Object value) throws IOException
index
- the FID column index among the primary key columns (as reported by the FIDMapper)value
- the column value
IOException
DataSourceException
public SimpleFeatureType getFeatureType()
public void startInsert() throws SQLException
SQLException
public void deleteCurrentRow() throws SQLException
SQLException
public void updateRow() throws SQLException
SQLException
public void doInsert() throws SQLException
SQLException
public FeatureTypeInfo getFeatureTypeInfo()
public boolean isClosed()
public void next() throws IOException
AttributeReader
next
in interface AttributeReader
next
in interface AttributeWriter
IOException
AttributeWriter.next()
public boolean hasNext() throws IOException
AttributeReader
hasNext
in interface AttributeReader
hasNext
in interface AttributeWriter
true
if additional content exists for
AttributeReader
IOException
AttributeWriter.hasNext()
public AttributeDescriptor getAttributeType(int index) throws ArrayIndexOutOfBoundsException
AttributeReader
getAttributeType
in interface AttributeReader
getAttributeType
in interface AttributeWriter
ArrayIndexOutOfBoundsException
AttributeReader.getAttributeType(int)
public FeatureListenerManager getListenerManager()
public void fireChangeRemoved(ReferencedEnvelope bounds, boolean isCommit)
public void fireFeaturesChanged(ReferencedEnvelope bounds, boolean isCommit)
public void fireFeaturesAdded(ReferencedEnvelope bounds, boolean isCommit)
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public Hints getHints()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |