| java.lang.Object org.geotools.data.AbstractDataStoreFactory org.geotools.data.db2.DB2DataStoreFactory
DB2DataStoreFactory | public class DB2DataStoreFactory extends AbstractDataStoreFactory implements DataStoreFactorySpi(Code) | | Implements the DataStoreFactorySpi interface to create an instance of a
DB2DataStore.
author: David Adler - IBM Corporation |
Method Summary | |
public boolean | canProcess(Map params) Check whether the parameter list passed identifies it as a request for a
DB2DataStore.
Most critical is the 'dbtype' parameter which must have the value 'DB2'.
If it is, then the remaining parameter values can be checked.
Parameters: params - Key/Value parameter list containing values required toidentify a request for a DB2DataStore and remaining values toidentify the database to be connected to. | public DataStore | createDataStore(Map params) Constructs a DB2 data store using the params.
If the port number is zero we will try to use the JDBC type 2 driver
and if the port number is non-zer, we will try to use the JDBC type 4
driver
Parameters: params - The full set of information needed to construct a livedata source. | public DataStore | createNewDataStore(Map params) Creating a new DB2 database is not supported.
Parameters: params - Doesn't much matter what this contains. | public static ManageableDataSource | getDefaultDataSource(String url, String user, String passwd, int maxActive, int minIdle, boolean validate) | public String | getDescription() Provide a String description of this data store. | public String | getDisplayName() Name suitable for display to end user. | public static String | getJDBCUrl(String host, int port, String database) | public Param[] | getParametersInfo() Returns the array of parameters used by DB2. | public boolean | isAvailable() Check whether the DB2 JDBC type 4 driver is found in the classpath. |
DB2PARMS | final static Param[] DB2PARMS(Code) | | |
MAXCONN | final public static Param MAXCONN(Code) | | |
MINCONN | final public static Param MINCONN(Code) | | |
VALIDATECONN | final public static Param VALIDATECONN(Code) | | |
canProcess | public boolean canProcess(Map params)(Code) | | Check whether the parameter list passed identifies it as a request for a
DB2DataStore.
Most critical is the 'dbtype' parameter which must have the value 'DB2'.
If it is, then the remaining parameter values can be checked.
Parameters: params - Key/Value parameter list containing values required toidentify a request for a DB2DataStore and remaining values toidentify the database to be connected to. true if dbtype equals DB2, and contains keys for host, user,passwd, and database. |
createDataStore | public DataStore createDataStore(Map params) throws IOException(Code) | | Constructs a DB2 data store using the params.
If the port number is zero we will try to use the JDBC type 2 driver
and if the port number is non-zer, we will try to use the JDBC type 4
driver
Parameters: params - The full set of information needed to construct a livedata source. Should have dbtype equal to DB2, as well as host,user, passwd, database, and table schema. The created DataSource, this may be null if the requiredresource was not found or if insufficent parameters were given.Note that canProcess() should have returned false if theproblem is to do with insuficent parameters. throws: IOException - See DataSourceException throws: DataSourceException - Thrown if there were any problems creatingor connecting the datasource. |
getDescription | public String getDescription()(Code) | | Provide a String description of this data store.
the data store description. |
getDisplayName | public String getDisplayName()(Code) | | Name suitable for display to end user.
A non localized display name for this data store type.
A short name suitable for display in a user interface. |
getJDBCUrl | public static String getJDBCUrl(String host, int port, String database)(Code) | | Returns the JDBC url used for connecting to a specific database
|
getParametersInfo | public Param[] getParametersInfo()(Code) | | Returns the array of parameters used by DB2.
Param[] Array of parameters. |
isAvailable | public boolean isAvailable()(Code) | | Check whether the DB2 JDBC type 4 driver is found in the classpath.
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
true if a DB2 driver is available for the DB2DataStore toconnect to a DB2 database. |
|
|