|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectJDBC1DataStore
JDBC2DataStore
public abstract class JDBC2DataStore
This JDBCDataStore is able to take advantage of additonal functionality provided by JDBC2 level drivers - for example ConnectionPools.
This class provides a default implementation of a JDBC data store. Support for vendor specific JDBC data stores can be easily added to Geotools by subclassing this class and overriding the hooks provided.
At a minimum subclasses should implement the following methods:
buildAttributeType(ResultSet)
- This
should be overriden to construct an attribute type that represents any
column types not supported by the default implementation, such as geometry
columns.
getGeometryAttributeIO(AttributeType, QueryData)
- Should be overriden to
provide a way to read/write geometries into the format of the database
Additionally subclasses can optionally override the following:
buildFIDMapperFactory(JDBCDataStoreConfig)
method, and eventually disallow
user overrides by throwing an UnsupportedOperationException
in
the setFidMapperFactory()
method.
allowTable
- Used to determine whether a table
name should be exposed as a feature type.
determineSRID
- Used to determine the
SpatialReference ID of a geometry column in a table.
buildSQLQuery()
- Sub classes can override this to build a custom SQL
query.
getResultSetType
if the standard result
set type is not satisfactory/does not work with a normal FORWARD_ONLY
resultset type
getConcurrency
to set the level of
concurrency for the result set used to read/write the database
Additionally subclasses may want to set the value of:
Field Summary | |
---|---|
protected DataSource |
dataSource
|
Fields inherited from class JDBC1DataStore |
---|
allowWriteOnVolatileFIDs, config, listenerManager, LOGGER, sqlNameEscape, transactionIsolation, TYPE_MAPPINGS, typeHandler |
Constructor Summary | |
---|---|
JDBC2DataStore(DataSource dataSource,
JDBCDataStoreConfig config)
Construct a JDBCDataStore with ConnectionPool and associated configuration. |
Method Summary | |
---|---|
protected Connection |
createConnection()
Create a connection for your JDBC1 database |
void |
dispose()
Disposes of this data store and releases any resource that it is using. |
protected void |
finalize()
|
Methods inherited from class Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DataSource dataSource
Constructor Detail |
---|
public JDBC2DataStore(DataSource dataSource, JDBCDataStoreConfig config) throws IOException
connectionPool
- config
-
IOException
Method Detail |
---|
protected Connection createConnection() throws SQLException
createConnection
in class JDBC1DataStore
SQLException
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void dispose()
DataAccess
A DataStore
cannot be used after dispose
has
been called, neither can any data access object it helped create, such
as FeatureReader
, FeatureSource
or FeatureCollection
.
This operation can be called more than once without side effects.
There is no thread safety assurance associated with this method. For example, client code will have to make sure this method is not called while retrieving/saving data from/to the storage, or be prepared for the consequences.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |