|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.geometryless.JDBCConnectionFactory
Creates ConnectionPool objects for a certain JDBC database instance.
Constructor Summary | |
JDBCConnectionFactory(java.lang.String url,
java.lang.String driver)
Creates a new JDBCConnectionFactory object from a specified database URL. |
Method Summary | |
void |
free(ConnectionPool connectionPool)
|
java.sql.Connection |
getConnection(java.util.Properties props)
Creates a database connection method to initialize a given database for feature extraction with the given Properties. |
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String password)
Creates a database connection method to initialize a given database for feature extraction with the user and password params. |
ConnectionPool |
getConnectionPool()
Creates and returns a ConnectionPool, or gets an existing ConnectionPool if one exists, based upon the username and password set in this JDBCConnectionFactory object. |
ConnectionPool |
getConnectionPool(java.lang.String username,
java.lang.String password)
Creates and returns a JDBC ConnectionPool, or gets an existing ConnectionPool if one exists, based upon the username and password parameters passed to this method. |
void |
setCharSet(java.lang.String charSet)
Sets a different character set for the postgis driver to use. |
void |
setLogin(java.lang.String username,
java.lang.String password)
Sets the JDBC database login credentials. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JDBCConnectionFactory(java.lang.String url, java.lang.String driver)
url
- the JDBC database URLMethod Detail |
public ConnectionPool getConnectionPool(java.lang.String username, java.lang.String password) throws java.sql.SQLException
username
- the JDBC usernamepassword
- the password corresponding to username
java.sql.SQLException
- if an error occurs connecting to the JDBC databasepublic java.sql.Connection getConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
user
- the name of the user connect to connect to the db.password
- the password for the user.
java.sql.SQLException
- if the configured sql driver could not be foundpublic java.sql.Connection getConnection(java.util.Properties props) throws java.sql.SQLException
props
- Should contain at a minimum the user and password.
Additional properties, such as charSet, can also be added.
java.sql.SQLException
- if the postgis sql driver could not be foundpublic ConnectionPool getConnectionPool() throws java.sql.SQLException
java.sql.SQLException
- if an error occurs connecting to the DBpublic void setLogin(java.lang.String username, java.lang.String password)
username
- the usernamepassword
- the passwordpublic void free(ConnectionPool connectionPool)
public void setCharSet(java.lang.String charSet)
charSet
- the string of a valid charset name.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |