|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.hsql.HsqlConnectionFactory
This creates connections for the HSQL datasource to make its transactions. To create a HsqlDataStore, create a HsqlConnectionFactory, and pass that connection factory to the HsqlDataStore constructor.
Constructor Summary | |
HsqlConnectionFactory(java.lang.String dbFileName,
java.lang.String user,
java.lang.String password)
Creates a new HsqlConnectionFactory object from a DB filename, a username and a password. |
Method Summary | |
java.sql.Connection |
getConnection()
|
java.sql.Connection |
getConnection(java.lang.String dbFileName)
|
java.sql.Connection |
getConnection(java.lang.String dbFileName,
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 username,
java.lang.String password)
Creates and returns a HSQL Connection based upon the username and password parameters passed to this method. |
java.sql.Connection |
getConnection(java.lang.String dbFileName,
java.lang.String user,
java.lang.String password)
Creates and returns a HSQL Connection based upon the username and password parameters passed to this method. |
void |
setCharSet(java.lang.String charSet)
Sets a different character set for the hsql driver to use. |
void |
setDBFileName(java.lang.String dbFileName)
Sets the HSQL database filename. |
void |
setLogin(java.lang.String username,
java.lang.String password)
Sets the HSQL database login credentials. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HsqlConnectionFactory(java.lang.String dbFileName, java.lang.String user, java.lang.String password)
dbFileName
- the HSQL database filenameuser
- the HSQL database usernamepassword
- the HSQL database password for userMethod Detail |
public java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException
- if an error occurs connecting to the HSQL databasepublic java.sql.Connection getConnection(java.lang.String dbFileName) throws java.sql.SQLException
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
username
- the HSQL usernamepassword
- the password corresponding to username
java.sql.SQLException
- if an error occurs connecting to the HSQL databasepublic java.sql.Connection getConnection(java.lang.String dbFileName, java.lang.String user, java.lang.String password) throws java.sql.SQLException
dbFileName
- the filename to use for the new database connection.user
- the name of the user connect to connect to the pgsql db.password
- the password for the user.
java.sql.SQLException
- if the postgis sql driver could not be foundpublic java.sql.Connection getConnection(java.lang.String dbFileName, java.util.Properties props) throws java.sql.SQLException
dbFileName
- the filename to use for the new database connection.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 void setLogin(java.lang.String username, java.lang.String password)
username
- the usernamepassword
- the passwordpublic void setDBFileName(java.lang.String dbFileName)
dbFileName
- the filename to use for this databasepublic 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 |