org.geotools.data.jdbc
Class QueryData

Object
  extended by QueryData
All Implemented Interfaces:
AttributeReader, AttributeWriter

Deprecated. scheduled for removal in 2.7, use classes in org.geotools.jdbc

public class QueryData
extends Object
implements AttributeReader, AttributeWriter

QueryData holds the ResultSet obtained from the sql query and has the following responsibilities:

Author:
aaime
Module:
modules/library/jdbc (gt-jdbc.jar)

Field Summary
protected  AttributeIO[] attributeHandlers
          Deprecated.  
protected  int baseIndex
          Deprecated.  
protected  Connection connection
          Deprecated.  
protected  FeatureTypeInfo featureTypeInfo
          Deprecated.  
protected  Object[] fidAttributes
          Deprecated.  
protected  Hints hints
          Deprecated.  
protected  FeatureListenerManager listenerManager
          Deprecated.  
protected static Logger LOGGER
          Deprecated. The logger for the data module.
protected  FIDMapper mapper
          Deprecated.  
protected  ResultSet resultSet
          Deprecated.  
protected  Statement statement
          Deprecated.  
protected  Transaction transaction
          Deprecated.  
 
Constructor Summary
QueryData(FeatureTypeInfo featureTypeInfo, JDBC1DataStore parentDataStore, Connection connection, Statement statement, ResultSet resultSet, Transaction transaction)
          Deprecated. Creates a new QueryData object.
QueryData(FeatureTypeInfo featureTypeInfo, JDBC1DataStore parentDataStore, Connection connection, Statement statement, ResultSet resultSet, Transaction transaction, Hints hints)
          Deprecated. Creates a new QueryData object.
 
Method Summary
 void close()
          Deprecated. Release any resources associated with this reader
 void close(SQLException sqlException)
          Deprecated. Closes the JDBC objects associated to the queryData and reports the sqlException on the LOG
 void deleteCurrentRow()
          Deprecated. Deletes the current record in the result set
 void doInsert()
          Deprecated. Insert a record in the current result set
protected  void finalize()
          Deprecated.  
 void fireChangeRemoved(ReferencedEnvelope bounds, boolean isCommit)
          Deprecated. Call after deleteCurrentRow()
 void fireFeaturesAdded(ReferencedEnvelope bounds, boolean isCommit)
          Deprecated. Call after doUpdate
 void fireFeaturesChanged(ReferencedEnvelope bounds, boolean isCommit)
          Deprecated. Call after updateRow
 int getAttributeCount()
          Deprecated. The number of attributes this reader can read, i.e the length of a row.
 AttributeIO[] getAttributeHandlers()
          Deprecated. Returns the AttributeIO objects used to parse and encode the column values stored in the database
 AttributeDescriptor getAttributeType(int index)
          Deprecated. Retrieve the AttributeType at the given index.
 Connection getConnection()
          Deprecated. DOCUMENT ME!
 SimpleFeatureType getFeatureType()
          Deprecated. Returns the current feature type
 FeatureTypeInfo getFeatureTypeInfo()
          Deprecated. DOCUMENT ME!
 Hints getHints()
          Deprecated.  
 FeatureListenerManager getListenerManager()
          Deprecated.  
 FIDMapper getMapper()
          Deprecated. Returns the FID mapper to be used when reading/writing features
 Transaction getTransaction()
          Deprecated. Returns the current transation
 boolean hasNext()
          Deprecated. Does another set of attributes exist in this reader?
 boolean isClosed()
          Deprecated.  
 void next()
          Deprecated. Advance the reader to the next set of attributes.
 Object read(int index)
          Deprecated. Read the attribute at the given index.
 Object readFidColumn(int index)
          Deprecated. Reads a column of the primary key
 void startInsert()
          Deprecated. Moves the result set to the insert row.
 void updateRow()
          Deprecated. Update the current record
 void write(int i, Object currAtt)
          Deprecated. Write the given attribute value at the position indicated.
 void writeFidColumn(int index, Object value)
          Deprecated. Writes a column of the primary key
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final Logger LOGGER
Deprecated. 
The logger for the data module.


fidAttributes

protected Object[] fidAttributes
Deprecated. 

featureTypeInfo

protected FeatureTypeInfo featureTypeInfo
Deprecated. 

resultSet

protected ResultSet resultSet
Deprecated. 

connection

protected Connection connection
Deprecated. 

transaction

protected Transaction transaction
Deprecated. 

statement

protected Statement statement
Deprecated. 

mapper

protected FIDMapper mapper
Deprecated. 

attributeHandlers

protected AttributeIO[] attributeHandlers
Deprecated. 

baseIndex

protected int baseIndex
Deprecated. 

listenerManager

protected FeatureListenerManager listenerManager
Deprecated. 

hints

protected Hints hints
Deprecated. 
Constructor Detail

QueryData

public QueryData(FeatureTypeInfo featureTypeInfo,
                 JDBC1DataStore parentDataStore,
                 Connection connection,
                 Statement statement,
                 ResultSet resultSet,
                 Transaction transaction)
          throws IOException
Deprecated. 
Creates a new QueryData object.

Parameters:
featureTypeInfo -
parentDataStore -
connection -
statement -
resultSet -
transaction -
Throws:
IOException

QueryData

public QueryData(FeatureTypeInfo featureTypeInfo,
                 JDBC1DataStore parentDataStore,
                 Connection connection,
                 Statement statement,
                 ResultSet resultSet,
                 Transaction transaction,
                 Hints hints)
          throws IOException
Deprecated. 
Creates a new QueryData object.

Parameters:
featureTypeInfo -
parentDataStore -
connection -
statement -
resultSet -
transaction -
Throws:
IOException
Method Detail

getAttributeCount

public int getAttributeCount()
Deprecated. 
Description copied from interface: AttributeReader
The number of attributes this reader can read, i.e the length of a row.

Specified by:
getAttributeCount in interface AttributeReader
Specified by:
getAttributeCount in interface AttributeWriter
Returns:
Number of attribtues this reader can read
See Also:
AttributeWriter.getAttributeCount()

getAttributeHandlers

public AttributeIO[] getAttributeHandlers()
Deprecated. 
Returns the AttributeIO objects used to parse and encode the column values stored in the database


getConnection

public Connection getConnection()
Deprecated. 
DOCUMENT ME!


getMapper

public FIDMapper getMapper()
Deprecated. 
Returns the FID mapper to be used when reading/writing features


getTransaction

public Transaction getTransaction()
Deprecated. 
Returns the current transation


close

public void close()
Deprecated. 
Description copied from interface: AttributeReader
Release any resources associated with this reader

Specified by:
close in interface AttributeReader
Specified by:
close in interface AttributeWriter
See Also:
AttributeWriter.close()

close

public void close(SQLException sqlException)
Deprecated. 
Closes the JDBC objects associated to the queryData and reports the sqlException on the LOG

Parameters:
sqlException -

read

public Object read(int index)
            throws IOException,
                   ArrayIndexOutOfBoundsException
Deprecated. 
Description copied from interface: AttributeReader
Read the attribute at the given index.

Specified by:
read in interface AttributeReader
Returns:
Object Attribute at given index
Throws:
IOException
ArrayIndexOutOfBoundsException
See Also:
AttributeReader.read(int)

write

public void write(int i,
                  Object currAtt)
           throws IOException
Deprecated. 
Description copied from interface: AttributeWriter
Write the given attribute value at the position indicated. Implementations can choose to immediately flush the write or buffer it.

Specified by:
write in interface AttributeWriter
Throws:
IOException
See Also:
AttributeWriter.write(int, java.lang.Object)

readFidColumn

public Object readFidColumn(int index)
                     throws IOException
Deprecated. 
Reads a column of the primary key

Parameters:
index - the column index among the primary key columns (as reported by the FIDMapper)
Returns:
fid value
Throws:
IOException
DataSourceException

writeFidColumn

public void writeFidColumn(int index,
                           Object value)
                    throws IOException
Deprecated. 
Writes a column of the primary key

Parameters:
index - the FID column index among the primary key columns (as reported by the FIDMapper)
value - the column value
Throws:
IOException
DataSourceException

getFeatureType

public SimpleFeatureType getFeatureType()
Deprecated. 
Returns the current feature type


startInsert

public void startInsert()
                 throws SQLException
Deprecated. 
Moves the result set to the insert row. Must be called before writing the attribute values for the new Feature

Throws:
SQLException

deleteCurrentRow

public void deleteCurrentRow()
                      throws SQLException
Deprecated. 
Deletes the current record in the result set

Throws:
SQLException

updateRow

public void updateRow()
               throws SQLException
Deprecated. 
Update the current record

Throws:
SQLException

doInsert

public void doInsert()
              throws SQLException
Deprecated. 
Insert a record in the current result set

Throws:
SQLException

getFeatureTypeInfo

public FeatureTypeInfo getFeatureTypeInfo()
Deprecated. 
DOCUMENT ME!


isClosed

public boolean isClosed()
Deprecated. 
Returns:
true if the QueryData has been closed, false otherwise

next

public void next()
          throws IOException
Deprecated. 
Description copied from interface: AttributeReader
Advance the reader to the next set of attributes.

Specified by:
next in interface AttributeReader
Specified by:
next in interface AttributeWriter
Throws:
IOException
See Also:
AttributeWriter.next()

hasNext

public boolean hasNext()
                throws IOException
Deprecated. 
Description copied from interface: AttributeReader
Does another set of attributes exist in this reader?

Specified by:
hasNext in interface AttributeReader
Specified by:
hasNext in interface AttributeWriter
Returns:
true if additional content exists for AttributeReader
Throws:
IOException
See Also:
AttributeWriter.hasNext()

getAttributeType

public AttributeDescriptor getAttributeType(int index)
                                     throws ArrayIndexOutOfBoundsException
Deprecated. 
Description copied from interface: AttributeReader
Retrieve the AttributeType at the given index.

Specified by:
getAttributeType in interface AttributeReader
Specified by:
getAttributeType in interface AttributeWriter
Returns:
AttributeType at given index
Throws:
ArrayIndexOutOfBoundsException
See Also:
AttributeReader.getAttributeType(int)

getListenerManager

public FeatureListenerManager getListenerManager()
Deprecated. 

fireChangeRemoved

public void fireChangeRemoved(ReferencedEnvelope bounds,
                              boolean isCommit)
Deprecated. 
Call after deleteCurrentRow()


fireFeaturesChanged

public void fireFeaturesChanged(ReferencedEnvelope bounds,
                                boolean isCommit)
Deprecated. 
Call after updateRow


fireFeaturesAdded

public void fireFeaturesAdded(ReferencedEnvelope bounds,
                              boolean isCommit)
Deprecated. 
Call after doUpdate


finalize

protected void finalize()
                 throws Throwable
Deprecated. 
Overrides:
finalize in class Object
Throws:
Throwable

getHints

public Hints getHints()
Deprecated. 


Copyright © 1996-2010 Geotools. All Rights Reserved.