|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractDataStoreFactory
JDBCDataStoreFactory
JDBCJNDIDataStoreFactory
public abstract class JDBCJNDIDataStoreFactory
Abstract implementation of DataStoreFactory for jdbc datastores which obtain a JNDI connection.
Subclasses should not need to override any methods, only just call the parent constructor passing in the non JNDI datastore factory to delegate to.
modules/library/jdbc (gt-jdbc.jar)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface DataAccessFactory |
---|
DataAccessFactory.Param |
Field Summary | |
---|---|
protected JDBCDataStoreFactory |
delegate
regular datastore factory to delegate to. |
static String |
J2EERootContext
|
static DataAccessFactory.Param |
JNDI_REFNAME
JNDI data source name |
Fields inherited from class JDBCDataStoreFactory |
---|
DATABASE, DATASOURCE, DBTYPE, FETCHSIZE, HOST, MAXCONN, MAXWAIT, MINCONN, NAMESPACE, PASSWD, PORT, SCHEMA, USER, VALIDATECONN |
Constructor Summary | |
---|---|
protected |
JDBCJNDIDataStoreFactory(JDBCDataStoreFactory delegate)
|
Method Summary | |
---|---|
protected DataSource |
createDataSource(Map params,
SQLDialect dialect)
Override to create the datasource from the external JNDI conection. |
protected JDBCDataStore |
createDataStoreInternal(JDBCDataStore dataStore,
Map params)
Subclass hook to do additional initialization of a newly created datastore. |
DataStore |
createNewDataStore(Map params)
|
protected SQLDialect |
createSQLDialect(JDBCDataStore dataStore)
Creates the dialect that the datastore uses for communication with the underlying database. |
protected String |
getDatabaseID()
Returns a string to identify the type of the database. |
String |
getDescription()
Describe the nature of the datasource constructed by this factory. |
String |
getDisplayName()
Default Implementation abuses the naming convention. |
protected String |
getDriverClassName()
Override which explicitly returns null because with a JNDI connection the driver is not known ahead of time. |
Map |
getImplementationHints()
Returns the implementation hints for the datastore. |
protected String |
getJDBCUrl(Map params)
Override which explicitly returns null since there is no jdbc url, the connection is identified by the JNDI name. |
protected String |
getValidationQuery()
Override which explicitly returns null, validation queries are not supported, my be part of the external data source configuration |
boolean |
isAvailable()
Determines if the datastore is available. |
protected void |
setupParameters(Map parameters)
Override to omit all those parameters which define the creation of the connection. |
Methods inherited from class JDBCDataStoreFactory |
---|
canProcess, createDataSource, createDataStore, getParametersInfo |
Methods inherited from class AbstractDataStoreFactory |
---|
getParameters |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String J2EERootContext
public static final DataAccessFactory.Param JNDI_REFNAME
protected JDBCDataStoreFactory delegate
Constructor Detail |
---|
protected JDBCJNDIDataStoreFactory(JDBCDataStoreFactory delegate)
Method Detail |
---|
protected String getDriverClassName()
getDriverClassName
in class JDBCDataStoreFactory
protected String getValidationQuery()
getValidationQuery
in class JDBCDataStoreFactory
protected String getJDBCUrl(Map params) throws IOException
getJDBCUrl
in class JDBCDataStoreFactory
IOException
protected DataSource createDataSource(Map params, SQLDialect dialect) throws IOException
createDataSource
in class JDBCDataStoreFactory
IOException
public boolean isAvailable()
Check in an Initial Context is available, that is all what can be done Checking for the right jdbc jars in the classpath is not possible here
isAvailable
in interface DataAccessFactory
isAvailable
in class JDBCDataStoreFactory
true
, override to check for drivers etc...protected void setupParameters(Map parameters)
setupParameters
in class JDBCDataStoreFactory
parameters
- Map of Param
objects.protected String getDatabaseID()
JDBCDataStoreFactory
Example: 'postgis'.
getDatabaseID
in class JDBCDataStoreFactory
public String getDisplayName()
AbstractDataStoreFactory
Will return Foo
for
org.geotools.data.foo.FooFactory
.
getDisplayName
in interface DataAccessFactory
getDisplayName
in class JDBCDataStoreFactory
public String getDescription()
DataAccessFactory
A non localized description of this data store type.
protected JDBCDataStore createDataStoreInternal(JDBCDataStore dataStore, Map params) throws IOException
JDBCDataStoreFactory
Typically subclasses will want to override this method in the case where they provide additional datastore parameters, those should be processed here.
This method is provided with an instance of the datastore. In some cases subclasses may wish to create a new instance of the datastore, for instance in order to wrap the original instance. This is supported but the new datastore must be returned from this method. If not is such the case this method should still return the original passed in.
createDataStoreInternal
in class JDBCDataStoreFactory
dataStore
- The newly created datastore.params
- THe datastore parameters.
IOException
public DataStore createNewDataStore(Map params) throws IOException
createNewDataStore
in interface DataStoreFactorySpi
createNewDataStore
in class JDBCDataStoreFactory
IOException
public Map getImplementationHints()
JDBCDataStoreFactory
Subclasses may override, this implementation returns null
.
getImplementationHints
in interface Factory
getImplementationHints
in class JDBCDataStoreFactory
protected SQLDialect createSQLDialect(JDBCDataStore dataStore)
JDBCDataStoreFactory
createSQLDialect
in class JDBCDataStoreFactory
dataStore
- The datastore.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |