| java.lang.Object org.geotools.data.hsql.HsqlConnection
HsqlConnection | public class HsqlConnection implements javax.sql.DataSource(Code) | | Shell for JDBC transactions of all types. This provides a base class to the
database transactional classes.
author: Amr Alam, Refractions Research |
Constructor Summary | |
public | HsqlConnection(String host, String port, String dbName) Constructor with all internal database driver classes, driver paths and
database types. |
Method Summary | |
public Connection | getConnection() | public Connection | getConnection(String user, String password) Retrieves a connection to the Mysql database, specifying a user and
password.
Parameters: user - The string of the user to connect to the database with. Parameters: password - The string of the corresponding password of user. | public PrintWriter | getLogWriter() An accessor function to get the log writer. | public String | getLoginPassword() An accessor function to get the password to log in to the db. | public int | getLoginTimeout() An accessor function to get the length of timeout. | public String | getLoginUser() An accessor function to get the user to log in to the db. | public void | setLogWriter(PrintWriter out) An setter method to set the log writer. | public void | setLogin(String user, String password) Sets the user and password strings of the login to be used when
connecting to the Mysql database. | public void | setLoginTimeout(int seconds) A setter function to get the length of timeout. |
HsqlConnection | public HsqlConnection(String host, String port, String dbName)(Code) | | Constructor with all internal database driver classes, driver paths and
database types.
Parameters: host - The driver class; should be passed from thedatabase-specific subclass. Parameters: port - The driver path; should be passed from the database-specificsubclass. Parameters: dbName - The database type; should be passed from thedatabase-specific subclass. |
getConnection | public Connection getConnection() throws SQLException(Code) | | Retrieves a connection to the Mysql database, using the current user and
password;
An open SQL connection with the database. throws: SQLException - if there are any database problems. |
getConnection | public Connection getConnection(String user, String password) throws SQLException(Code) | | Retrieves a connection to the Mysql database, specifying a user and
password.
Parameters: user - The string of the user to connect to the database with. Parameters: password - The string of the corresponding password of user. An open SQL connection with the database. throws: SQLException - if there are any database problems. |
getLogWriter | public PrintWriter getLogWriter()(Code) | | An accessor function to get the log writer.
a writer |
getLoginPassword | public String getLoginPassword()(Code) | | An accessor function to get the password to log in to the db.
a string of the password. |
getLoginTimeout | public int getLoginTimeout()(Code) | | An accessor function to get the length of timeout.
the time out. |
getLoginUser | public String getLoginUser()(Code) | | An accessor function to get the user to log in to the db.
the user. |
setLogWriter | public void setLogWriter(PrintWriter out)(Code) | | An setter method to set the log writer.
Parameters: out - the writer to use for logging. |
setLogin | public void setLogin(String user, String password)(Code) | | Sets the user and password strings of the login to be used when
connecting to the Mysql database.
Parameters: user - The string of the user to connect to the database with. Parameters: password - The string of the password of user. |
setLoginTimeout | public void setLoginTimeout(int seconds)(Code) | | A setter function to get the length of timeout.
Parameters: seconds - the length of the time out. |
|
|