gistoolkit.datasources.oracle
Class UpdateableOracleDataSource

java.lang.Object
  extended bygistoolkit.datasources.SimpleDataSource
      extended bygistoolkit.datasources.SimpleDBDataSource
          extended bygistoolkit.datasources.oracle.OracleDataSource
              extended bygistoolkit.datasources.oracle.UpdateableOracleDataSource
All Implemented Interfaces:
DataSource

public class UpdateableOracleDataSource
extends OracleDataSource

Class used to allow selects as well as inserts, updates and deletes from an oracle table. This class uses the Oracle Locator features that are shipped with oracle databases 8i and above.


Field Summary
 
Fields inherited from class gistoolkit.datasources.oracle.OracleDataSource
myCon, myDatabaseName, myEnvelope, myStmt
 
Fields inherited from class gistoolkit.datasources.SimpleDataSource
 
Constructor Summary
UpdateableOracleDataSource()
          Creates new UpdateableOracleDataSource.
 
Method Summary
 void commit()
          Commit all changes since the last commit.
 java.sql.Connection connect()
          Initializes the connection to the database.
 void doDelete(Record inRecord)
          Delete this record from the database.
 void doInsert(Record inRecord)
          Inserts the given record into the datasource.
 void doUpdate(Record inRecord)
          Update the data source with the changed record.
 java.lang.String getDatabaseTablename()
          return the tablename to use when accessing the data source
 Node getNode()
          Get the configuration information for this data source
 Style getStyle()
          Get the style to use with this datasource.
 java.lang.String[] getValidShapeTypes()
          Return the valid shapes for this data source
 boolean isUpdateable()
          Determines if this datasource is updateable.
protected  GISDataset readShapes(Envelope inEnvelope)
          This method returns the shapes from the data source
 void rollback()
          Rollback any changes to this datasource since the last commit.
 void setDatabaseTablename(java.lang.String inDatabaseTablename)
          Set the table name to use when accessing the data source
 void setNode(Node inNode)
          Set the configuration information for this data source
 
Methods inherited from class gistoolkit.datasources.oracle.OracleDataSource
getDatabaseDriver, getDatabaseName, getDatabasePassword, getDatabasePort, getDatabaseSchema, getDatabaseServername, getDatabaseShapeColumn, getDatabaseSpatialReferenceID, getDatabaseURLBase, getDatabaseUsername, getName, getSQLConverter, getWhereString, parseGISToolkitShape, parseSDOStruct, readEnvelope, setDatabaseDriver, setDatabaseName, setDatabasePassword, setDatabasePort, setDatabaseSchema, setDatabaseServername, setDatabaseShapeColumn, setDatabaseSpatialReferenceID, setDatabaseSpatialReferenceID, setDatabaseURLBase, setDatabaseUsername, setName
 
Methods inherited from class gistoolkit.datasources.SimpleDBDataSource
getFilter, getFilterSQL, setFilter
 
Methods inherited from class gistoolkit.datasources.SimpleDataSource
addDataSourceListener, clearCache, delete, doCommit, doRollback, filterDataset, fireCommit, fireDelete, fireInsert, fireRead, fireRollBack, fireUpdate, getCached, getCacheDataset, getCacheEnvelope, getEnvelope, getFromProjection, getToProjection, insert, isCachedProjected, projectBackward, projectForward, queryFromCache, readDataset, readDataset, removeDataSourceListener, setCache, setCached, setFromProjection, setProjection, setToProjection, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateableOracleDataSource

public UpdateableOracleDataSource()
Creates new UpdateableOracleDataSource.

This is the zero parameter constructor used for creating the datasource from configuration information.

Method Detail

setDatabaseTablename

public void setDatabaseTablename(java.lang.String inDatabaseTablename)
Set the table name to use when accessing the data source


getDatabaseTablename

public java.lang.String getDatabaseTablename()
return the tablename to use when accessing the data source


getValidShapeTypes

public java.lang.String[] getValidShapeTypes()
Return the valid shapes for this data source

Overrides:
getValidShapeTypes in class SimpleDataSource

connect

public java.sql.Connection connect()
                            throws java.lang.Exception
Description copied from class: OracleDataSource
Initializes the connection to the database.

Overrides:
connect in class OracleDataSource
Throws:
java.lang.Exception

readShapes

protected GISDataset readShapes(Envelope inEnvelope)
                         throws java.lang.Exception
This method returns the shapes from the data source

Specified by:
readShapes in class SimpleDataSource
Throws:
java.lang.Exception

getNode

public Node getNode()
Get the configuration information for this data source

Specified by:
getNode in interface DataSource
Overrides:
getNode in class OracleDataSource

setNode

public void setNode(Node inNode)
             throws java.lang.Exception
Set the configuration information for this data source

Specified by:
setNode in interface DataSource
Overrides:
setNode in class OracleDataSource
Throws:
java.lang.Exception

isUpdateable

public boolean isUpdateable()
Determines if this datasource is updateable. By default it is not, so this method always returns true to override the super class.

Specified by:
isUpdateable in interface DataSource
Overrides:
isUpdateable in class SimpleDataSource

doInsert

public void doInsert(Record inRecord)
              throws java.lang.Exception
Inserts the given record into the datasource.

Overrides:
doInsert in class SimpleDataSource
Throws:
java.lang.Exception

doUpdate

public void doUpdate(Record inRecord)
              throws java.lang.Exception
Update the data source with the changed record. By default this is a read only data source, so this method does nothing.

Overrides:
doUpdate in class SimpleDataSource
Throws:
java.lang.Exception

doDelete

public void doDelete(Record inRecord)
              throws java.lang.Exception
Delete this record from the database. By default this is a read only data source, so this method does nothing.

Overrides:
doDelete in class SimpleDataSource
Throws:
java.lang.Exception

commit

public void commit()
            throws java.lang.Exception
Commit all changes since the last commit. This is a read only data source by default, so this method does nothing.

Specified by:
commit in interface DataSource
Overrides:
commit in class SimpleDataSource
Throws:
java.lang.Exception

rollback

public void rollback()
              throws java.lang.Exception
Rollback any changes to this datasource since the last commit.

Specified by:
rollback in interface DataSource
Overrides:
rollback in class SimpleDataSource
Throws:
java.lang.Exception

getStyle

public Style getStyle()
Get the style to use with this datasource.

Specified by:
getStyle in interface DataSource
Overrides:
getStyle in class SimpleDataSource