|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractDataStoreFactory
JDBCDataStoreFactory
SpatiaLiteDataStoreFactory
public class SpatiaLiteDataStoreFactory
DataStoreFactory for SpatiaLite database.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface DataAccessFactory |
|---|
DataAccessFactory.Param |
| Field Summary | |
|---|---|
static DataAccessFactory.Param |
DBTYPE
parameter for database type |
static DataAccessFactory.Param |
USER
optional user parameter |
| Fields inherited from class JDBCDataStoreFactory |
|---|
DATABASE, DATASOURCE, EXPOSE_PK, FETCHSIZE, HOST, MAX_OPEN_PREPARED_STATEMENTS, MAXCONN, MAXWAIT, MINCONN, NAMESPACE, PASSWD, PK_METADATA_TABLE, PORT, SCHEMA, SQL_ON_BORROW, SQL_ON_RELEASE, VALIDATECONN |
| Constructor Summary | |
|---|---|
SpatiaLiteDataStoreFactory()
|
|
| Method Summary | |
|---|---|
BasicDataSource |
createDataSource(Map params)
DataSource access allowing SQL use: intended to allow client code to query available schemas. |
protected SQLDialect |
createSQLDialect(JDBCDataStore dataStore)
Creates the dialect that the datastore uses for communication with the underlying database. |
File |
getBaseDirectory()
The base location to store sqlite database files. |
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. |
protected String |
getDriverClassName()
Returns the fully qualified class name of the jdbc driver. |
protected String |
getJDBCUrl(Map params)
Builds up the JDBC url in a jdbc: |
protected String |
getValidationQuery()
Override this to return a good validation query (a very quick one, such as one that asks the database what time is it) or return null if the factory does not support validation. |
boolean |
isAvailable()
Determines if the datastore is available. |
void |
setBaseDirectory(File baseDirectory)
Sets the base location to store sqlite database files. |
protected void |
setupParameters(Map parameters)
Sets up the database connection parameters. |
| Methods inherited from class JDBCDataStoreFactory |
|---|
canProcess, checkDBType, checkDBType, createDataSource, createDataStore, createDataStoreInternal, createNewDataStore, getDisplayName, getImplementationHints, 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 DataAccessFactory.Param DBTYPE
public static final DataAccessFactory.Param USER
| Constructor Detail |
|---|
public SpatiaLiteDataStoreFactory()
| Method Detail |
|---|
public void setBaseDirectory(File baseDirectory)
baseDirectory - A directory.public File getBaseDirectory()
public boolean isAvailable()
JDBCDataStoreFactory
Subclasses may with to override or extend this method. This implementation
checks whether the jdbc driver class (provided by JDBCDataStoreFactory.getDriverClassName()
can be loaded.
isAvailable in interface DataAccessFactoryisAvailable in class JDBCDataStoreFactorytrue, override to check for drivers etc...protected SQLDialect createSQLDialect(JDBCDataStore dataStore)
JDBCDataStoreFactory
createSQLDialect in class JDBCDataStoreFactorydataStore - The datastore.protected String getDatabaseID()
JDBCDataStoreFactoryExample: 'postgis'.
getDatabaseID in class JDBCDataStoreFactoryprotected String getDriverClassName()
JDBCDataStoreFactoryFor example: org.postgresql.Driver
getDriverClassName in class JDBCDataStoreFactorypublic String getDescription()
DataAccessFactoryA non localized description of this data store type.
protected String getValidationQuery()
JDBCDataStoreFactory
getValidationQuery in class JDBCDataStoreFactoryprotected void setupParameters(Map parameters)
JDBCDataStoreFactorySubclasses may extend, but should not override. This implementation registers the following parameters.
JDBCDataStoreFactory.HOST
JDBCDataStoreFactory.PORT
JDBCDataStoreFactory.DATABASE
JDBCDataStoreFactory.SCHEMA
JDBCDataStoreFactory.USER
JDBCDataStoreFactory.PASSWD
setupParameters in class JDBCDataStoreFactoryparameters - Map of Param objects.
protected String getJDBCUrl(Map params)
throws IOException
JDBCDataStoreFactory
getJDBCUrl in class JDBCDataStoreFactoryIOException
public BasicDataSource createDataSource(Map params)
throws IOException
JDBCDataStoreFactoryThis DataSource is the clients responsibility to close() when they are finished using it.
createDataSource in class JDBCDataStoreFactoryparams - Map of connection parameter.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||