|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.data.hsql.HsqlConnection
Shell for JDBC transactions of all types. This provides a base class to the database transactional classes.
| Constructor Summary | |
HsqlConnection(java.lang.String host,
java.lang.String port,
java.lang.String dbName)
Constructor with all internal database driver classes, driver paths and database types. |
|
| Method Summary | |
java.sql.Connection |
getConnection()
Retrieves a connection to the Mysql database, using the current user and password; |
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String password)
Retrieves a connection to the Mysql database, specifying a user and password. |
java.lang.String |
getLoginPassword()
An accessor function to get the password to log in to the db. |
int |
getLoginTimeout()
An accessor function to get the length of timeout. |
java.lang.String |
getLoginUser()
An accessor function to get the user to log in to the db. |
java.io.PrintWriter |
getLogWriter()
An accessor function to get the log writer. |
void |
setLogin(java.lang.String user,
java.lang.String password)
Sets the user and password strings of the login to be used when connecting to the Mysql database. |
void |
setLoginTimeout(int seconds)
A setter function to get the length of timeout. |
void |
setLogWriter(java.io.PrintWriter out)
An setter method to set the log writer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HsqlConnection(java.lang.String host,
java.lang.String port,
java.lang.String dbName)
host - The driver class; should be passed from the
database-specific subclass.port - The driver path; should be passed from the database-specific
subclass.dbName - The database type; should be passed from the
database-specific subclass.| Method Detail |
public void setLogin(java.lang.String user,
java.lang.String password)
user - The string of the user to connect to the database with.password - The string of the password of user.public java.lang.String getLoginUser()
public java.lang.String getLoginPassword()
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLException - if there are any database problems.
public java.sql.Connection getConnection(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourceuser - The string of the user to connect to the database with.password - The string of the corresponding password of user.
java.sql.SQLException - if there are any database problems.public int getLoginTimeout()
getLoginTimeout in interface javax.sql.DataSourcepublic void setLoginTimeout(int seconds)
setLoginTimeout in interface javax.sql.DataSourceseconds - the length of the time out.public java.io.PrintWriter getLogWriter()
getLogWriter in interface javax.sql.DataSourcepublic void setLogWriter(java.io.PrintWriter out)
setLogWriter in interface javax.sql.DataSourceout - the writer to use for logging.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||