|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPostgisConnectionFactory
DataSource
, DataSourceUtil
and DataSourceFinder
instead
*
public class PostgisConnectionFactory
Shell for JDBC transactions of all types. This creates connections for the postgis datasource to make its transactions. To create a PostgisDataSource, create a PostgisConnectionFactory, then call getConnection(), and pass that connection to the PostgisDataSource constructor.
Constructor Summary | |
---|---|
PostgisConnectionFactory(String host,
int port,
String dbName)
Deprecated. Constructor with all internal database driver classes, driver paths and database types. |
|
PostgisConnectionFactory(String host,
String port,
String dbName)
Deprecated. Constructor with all internal database driver classes, driver paths and database types. |
Method Summary | |
---|---|
void |
free(ConnectionPool connectionPool)
Deprecated. |
Connection |
getConnection()
Deprecated. Creates a database connection method to initialize a given database for feature extraction using the set username and password. |
Connection |
getConnection(Properties props)
Deprecated. Creates a database connection method to initialize a given database for feature extraction with the given Properties. |
Connection |
getConnection(String user,
String password)
Deprecated. Creates a database connection method to initialize a given database for feature extraction with the user and password params. |
ConnectionPool |
getConnectionPool()
Deprecated. |
ConnectionPool |
getConnectionPool(String user,
String pass)
Deprecated. |
void |
setLogin(String user,
String password)
Deprecated. Creates a database connection method to initialize a given database for feature extraction. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PostgisConnectionFactory(String host, String port, String dbName)
host
- The name or ip address of the computer where the postgis
database is installed.port
- The port to connect on; 5432 is generally the postgres
default.dbName
- The name of the pgsql database that holds the tables of
the feature types that will be used by PostgisDataSource.public PostgisConnectionFactory(String host, int port, String dbName)
host
- The name or ip address of the computer where the postgis
database is installed.port
- The port to connect on; 5432 is generally the postgres
default.dbName
- The name of the pgsql database that holds the tables of
the feature types that will be used by PostgisDataSource.Method Detail |
---|
public void setLogin(String user, String password)
user
- the name of the user connect to connect to the pgsql db.password
- the password for the user.public Connection getConnection() throws SQLException
SQLException
- if the postgres driver could not be foundpublic Connection getConnection(String user, String password) throws SQLException
user
- the name of the user connect to connect to the pgsql db.password
- the password for the user.
SQLException
- if the postgis sql driver could not be foundpublic ConnectionPool getConnectionPool(String user, String pass) throws SQLException
SQLException
public ConnectionPool getConnectionPool() throws SQLException
SQLException
public void free(ConnectionPool connectionPool)
public Connection getConnection(Properties props) throws SQLException
props
- Should contain at a minimum the user and password.
Additional properties, such as charSet, can also be added.
SQLException
- if the postgis sql driver could not be found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |