Class AbstractSpatialDatabasesDSDriver
- java.lang.Object
-
- com.vividsolutions.jump.datastore.spatialdatabases.AbstractSpatialDatabasesDSDriver
-
- All Implemented Interfaces:
DataStoreDriver
- Direct Known Subclasses:
H2DataStoreDriver,H2ServerDataStoreDriver,MariadbDataStoreDriver,OracleDataStoreDriver,PostgisDataStoreDriver,SpatialiteDataStoreDriver
public abstract class AbstractSpatialDatabasesDSDriver extends Object implements DataStoreDriver
A driver for supplyingSpatialDatabasesDSConnections
-
-
Field Summary
Fields Modifier and Type Field Description protected StringdriverNameprotected StringjdbcClassprotected DriverjdbcDriverstatic StringPARAM_DB_Filestatic StringPARAM_Instancestatic StringPARAM_Passwordstatic StringPARAM_Portstatic StringPARAM_Serverstatic StringPARAM_Userprotected Class[]paramClassesprotected String[]paramNamesprotected ParameterListSchemaschemaprotected StringurlPrefix-
Fields inherited from interface com.vividsolutions.jump.datastore.DataStoreDriver
REGISTRY_CLASSIFICATION
-
-
Constructor Summary
Constructors Constructor Description AbstractSpatialDatabasesDSDriver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract DataStoreConnectioncreateConnection(ParameterList params)protected ConnectioncreateJdbcConnection(ParameterList params)convenience wrapper for thecreateJdbcConnection(ParameterList, Properties)belowprotected ConnectioncreateJdbcConnection(ParameterList params, Properties connProps)use this method in your implementation to create the actual JDBC connectionprotected StringcreateJdbcUrl(ParameterList params)overwrite this method if you have some fancy url scheme and createJdbcConnection() will use that instead of the default implementationStringgetJdbcClass()DrivergetJdbcDriver()StringgetJdbcDriverVersion()StringgetName()Class[]getParamClasses()ParameterListSchemagetParameterListSchema()String[]getParamNames()ParameterListSchemagetSchema()StringgetUrlPrefix()StringgetVersion()protected voidinitializeJdbcDriver()booleanisAdHocQuerySupported()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vividsolutions.jump.datastore.DataStoreDriver
getConnectedIcon, getDisconnectedIcon, toString
-
-
-
-
Field Detail
-
PARAM_Server
public static final String PARAM_Server
- See Also:
- Constant Field Values
-
PARAM_Port
public static final String PARAM_Port
- See Also:
- Constant Field Values
-
PARAM_Instance
public static final String PARAM_Instance
- See Also:
- Constant Field Values
-
PARAM_User
public static final String PARAM_User
- See Also:
- Constant Field Values
-
PARAM_Password
public static final String PARAM_Password
- See Also:
- Constant Field Values
-
PARAM_DB_File
public static final String PARAM_DB_File
- See Also:
- Constant Field Values
-
driverName
protected String driverName
-
jdbcClass
protected String jdbcClass
-
jdbcDriver
protected Driver jdbcDriver
-
urlPrefix
protected String urlPrefix
-
paramNames
protected String[] paramNames
-
paramClasses
protected Class[] paramClasses
-
schema
protected ParameterListSchema schema
-
-
Method Detail
-
getJdbcDriver
public Driver getJdbcDriver()
- Specified by:
getJdbcDriverin interfaceDataStoreDriver
-
getJdbcDriverVersion
public String getJdbcDriverVersion()
- Specified by:
getJdbcDriverVersionin interfaceDataStoreDriver
-
getJdbcClass
public String getJdbcClass()
-
getUrlPrefix
public String getUrlPrefix()
-
getParamNames
public String[] getParamNames()
-
getParamClasses
public Class[] getParamClasses()
-
getSchema
public ParameterListSchema getSchema()
-
getName
public String getName()
- Specified by:
getNamein interfaceDataStoreDriver
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfaceDataStoreDriver
-
getParameterListSchema
public ParameterListSchema getParameterListSchema()
- Specified by:
getParameterListSchemain interfaceDataStoreDriver
-
initializeJdbcDriver
protected void initializeJdbcDriver() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException
-
createJdbcUrl
protected String createJdbcUrl(ParameterList params)
overwrite this method if you have some fancy url scheme and createJdbcConnection() will use that instead of the default implementation- Parameters:
params- list of parameters to create a JDBC URL- Returns:
- an URL String from given parameters
-
createJdbcConnection
protected Connection createJdbcConnection(ParameterList params) throws Exception
convenience wrapper for thecreateJdbcConnection(ParameterList, Properties)below- Parameters:
params- list of parameters to create a Connection to a Spatial Database- Returns:
- a Connection from the given parameters
- Throws:
Exception- if an exception occurs during connection creation
-
createJdbcConnection
protected Connection createJdbcConnection(ParameterList params, Properties connProps) throws Exception
use this method in your implementation to create the actual JDBC connection- Parameters:
params- list of parameters to create a Connection to a Spatial DatabaseconnProps- properties to create the connection- Returns:
- a Connection from the list of parameters and the database properties
- Throws:
Exception- if an exception occurs during connection creation
-
createConnection
public abstract DataStoreConnection createConnection(ParameterList params) throws Exception
- Specified by:
createConnectionin interfaceDataStoreDriver- Throws:
Exception
-
isAdHocQuerySupported
public boolean isAdHocQuerySupported()
- Specified by:
isAdHocQuerySupportedin interfaceDataStoreDriver
-
-