|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.AbstractDataStoreFactory org.geotools.data.db2.DB2DataStoreFactory
Implements the DataStoreFactorySpi interface to create an instance of a DB2DataStore.
Nested Class Summary |
Nested classes inherited from class org.geotools.data.DataStoreFactorySpi |
DataStoreFactorySpi.Param |
Constructor Summary | |
DB2DataStoreFactory()
|
Method Summary | |
boolean |
canProcess(java.util.Map params)
Check whether the parameter list passed identifies it as a request for a DB2DataStore. |
DataStore |
createDataStore(java.util.Map params)
Constructs a DB2 data store using the params. |
DataStore |
createNewDataStore(java.util.Map params)
Creating a new DB2 database is not supported. |
java.lang.String |
getDescription()
Provide a String description of this data store. |
java.lang.String |
getDisplayName()
Name suitable for display to end user. |
DataStoreFactorySpi.Param[] |
getParametersInfo()
Returns the array of parameters used by DB2. |
boolean |
isAvailable()
Check whether the DB2 JDBC type 4 driver is found in the classpath. |
Methods inherited from class org.geotools.data.AbstractDataStoreFactory |
getImplementationHints, getParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.factory.Factory |
getImplementationHints |
Constructor Detail |
public DB2DataStoreFactory()
Method Detail |
public DataStore createDataStore(java.util.Map params) throws java.io.IOException
createDataStore
in interface DataStoreFactorySpi
params
- The full set of information needed to construct a live
data source. Should have dbtype equal to DB2, as well as host,
user, passwd, database, and table schema.
java.io.IOException
- See DataSourceException
DataSourceException
- Thrown if there were any problems creating
or connecting the datasource.public DataStore createNewDataStore(java.util.Map params) throws java.lang.UnsupportedOperationException
createNewDataStore
in interface DataStoreFactorySpi
params
- Doesn't much matter what this contains.
java.lang.UnsupportedOperationException
- Cannot create new databasepublic java.lang.String getDescription()
getDescription
in interface DataStoreFactorySpi
public java.lang.String getDisplayName()
A non localized display name for this data store type.
getDisplayName
in interface DataStoreFactorySpi
getDisplayName
in class AbstractDataStoreFactory
public DataStoreFactorySpi.Param[] getParametersInfo()
getParametersInfo
in interface DataStoreFactorySpi
public boolean canProcess(java.util.Map params)
Most critical is the 'dbtype' parameter which must have the value 'DB2'. If it is, then the remaining parameter values can be checked.
canProcess
in interface DataStoreFactorySpi
canProcess
in class AbstractDataStoreFactory
params
- Key/Value parameter list containing values required to
identify a request for a DB2DataStore and remaining values to
identify the database to be connected to.
public boolean isAvailable()
If it isn't, there is a problem since the FactoryFinder found the DB2DataStoreFactory but there is no driver to connect to a DB2 database.
The classpath should have db2jcc.jar and db2jcc_license_cu.jar
isAvailable
in interface DataStoreFactorySpi
isAvailable
in class AbstractDataStoreFactory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |