|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.data.jdbc.QueryData
QueryData holds the ResultSet obtained from the sql query and has the following responsibilities:
| Field Summary | |
protected AttributeIO[] |
attributeHandlers
|
protected int |
baseIndex
|
protected java.sql.Connection |
connection
|
protected FeatureTypeInfo |
featureTypeInfo
|
protected java.lang.Object[] |
fidAttributes
|
protected FIDMapper |
mapper
|
protected java.sql.ResultSet |
resultSet
|
protected java.sql.Statement |
statement
|
protected Transaction |
transaction
|
| Constructor Summary | |
QueryData(FeatureTypeInfo featureTypeInfo,
JDBC1DataStore parentDataStore,
java.sql.Connection connection,
java.sql.Statement statement,
java.sql.ResultSet resultSet,
Transaction transaction)
Creates a new QueryData object. |
|
| Method Summary | |
void |
close()
Release any resources associated with this reader |
void |
close(java.sql.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 |
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 |
AttributeType |
getAttributeType(int index)
Retrieve the AttributeType at the given index. |
java.sql.Connection |
getConnection()
DOCUMENT ME! |
FeatureType |
getFeatureType()
Returns the current feature type |
FeatureTypeInfo |
getFeatureTypeInfo()
DOCUMENT ME! |
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. |
java.lang.Object |
read(int index)
Read the attribute at the given index. |
java.lang.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,
java.lang.Object currAtt)
Write the given attribute value at the position indicated. |
void |
writeFidColumn(int index,
java.lang.Object value)
Writes a column of the primary key |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.Object[] fidAttributes
protected FeatureTypeInfo featureTypeInfo
protected java.sql.ResultSet resultSet
protected java.sql.Connection connection
protected Transaction transaction
protected java.sql.Statement statement
protected FIDMapper mapper
protected AttributeIO[] attributeHandlers
protected int baseIndex
| Constructor Detail |
public QueryData(FeatureTypeInfo featureTypeInfo,
JDBC1DataStore parentDataStore,
java.sql.Connection connection,
java.sql.Statement statement,
java.sql.ResultSet resultSet,
Transaction transaction)
throws java.io.IOException
featureTypeInfo - parentDataStore - connection - statement - resultSet - transaction - | Method Detail |
public int getAttributeCount()
AttributeReader
getAttributeCount in interface AttributeReaderAttributeWriter.getAttributeCount()public AttributeIO[] getAttributeHandlers()
public java.sql.Connection getConnection()
public FIDMapper getMapper()
public Transaction getTransaction()
public void close()
AttributeReader
close in interface AttributeReaderAttributeWriter.close()public void close(java.sql.SQLException sqlException)
sqlException -
public java.lang.Object read(int index)
throws java.io.IOException,
java.lang.ArrayIndexOutOfBoundsException
AttributeReader
read in interface AttributeReaderjava.io.IOException
java.lang.ArrayIndexOutOfBoundsExceptionAttributeReader.read(int)
public void write(int i,
java.lang.Object currAtt)
throws java.io.IOException
AttributeWriter
write in interface AttributeWriterjava.io.IOExceptionAttributeWriter.write(int, java.lang.Object)
public java.lang.Object readFidColumn(int index)
throws java.io.IOException
index - the column index among the primary key columns (as reported by the FIDMapper)
java.io.IOException - DOCUMENT ME!
DataSourceException - DOCUMENT ME!
public void writeFidColumn(int index,
java.lang.Object value)
throws java.io.IOException
index - the FID column index among the primary key columns (as reported by the FIDMapper)value - the column value
java.io.IOException
DataSourceExceptionpublic FeatureType getFeatureType()
public void startInsert()
throws java.sql.SQLException
java.sql.SQLException
public void deleteCurrentRow()
throws java.sql.SQLException
java.sql.SQLException
public void updateRow()
throws java.sql.SQLException
java.sql.SQLException
public void doInsert()
throws java.sql.SQLException
java.sql.SQLExceptionpublic FeatureTypeInfo getFeatureTypeInfo()
public boolean isClosed()
public void next()
throws java.io.IOException
AttributeReader
next in interface AttributeReaderjava.io.IOExceptionAttributeWriter.next()
public boolean hasNext()
throws java.io.IOException
AttributeReader
hasNext in interface AttributeReadertrue if additional content exists for
AttributeReader
java.io.IOExceptionAttributeWriter.hasNext()
public AttributeType getAttributeType(int index)
throws java.lang.ArrayIndexOutOfBoundsException
AttributeReader
getAttributeType in interface AttributeReaderjava.lang.ArrayIndexOutOfBoundsExceptionAttributeReader.getAttributeType(int)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||