|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hsqldb.util.RCData
All the info we need to connect up to a database.
Field Summary | |
static java.lang.String |
DEFAULT_JDBC_DRIVER
|
Constructor Summary | |
RCData(java.io.File file,
java.lang.String dbKey)
Creates a RCDataObject by looking up the given key in the given authentication file. |
|
RCData(java.lang.String id,
java.lang.String url,
java.lang.String username,
java.lang.String password,
java.lang.String driver,
java.lang.String charset,
java.lang.String truststore)
Convenience constructor for backward compatibility. |
|
RCData(java.lang.String id,
java.lang.String url,
java.lang.String username,
java.lang.String password,
java.lang.String driver,
java.lang.String charset,
java.lang.String truststore,
java.lang.String libpath)
Creates a new RCData object. |
Method Summary | |
static java.lang.String |
expandSysPropVars(java.lang.String inString)
|
java.sql.Connection |
getConnection()
Gets a JDBC Connection using the data of this RCData object. |
java.sql.Connection |
getConnection(java.lang.String curDriver,
java.lang.String curCharset,
java.lang.String curTrustStore)
Gets a JDBC Connection using the data of this RCData object with specified override elements |
java.lang.String |
getDefaultJdbcDriverName()
|
void |
report()
Just for testing and debugging. |
void |
setDefaultJdbcDriver(java.lang.String defaultJdbcDriverName)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_JDBC_DRIVER
Constructor Detail |
public RCData(java.io.File file, java.lang.String dbKey) throws java.lang.Exception
dbKey
- Key to look up in the file.file
- File containing the authentication information.public RCData(java.lang.String id, java.lang.String url, java.lang.String username, java.lang.String password, java.lang.String driver, java.lang.String charset, java.lang.String truststore) throws java.lang.Exception
RCData(String,String,String,String,String,String,String,String)
public RCData(java.lang.String id, java.lang.String url, java.lang.String username, java.lang.String password, java.lang.String driver, java.lang.String charset, java.lang.String truststore, java.lang.String libpath) throws java.lang.Exception
Creates a new RCData
object.
The parameters driver, charset, truststore, and libpath are optional.
Setting these parameters to NULL
will set them to their
default values.
id
- The identifier for these connection settingsurl
- The URL of the database to connect tousername
- The username to log in aspassword
- The password of the usernamedriver
- The JDBC driver to usecharset
- The character set to usetruststore
- The trust store to uselibpath
- The JDBC library to add to CLASSPATH
java.lang.Exception
- if the a non-optional parameter is set to NULL
Method Detail |
public void setDefaultJdbcDriver(java.lang.String defaultJdbcDriverName)
public java.lang.String getDefaultJdbcDriverName()
public void report()
public java.sql.Connection getConnection() throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.sql.SQLException, java.net.MalformedURLException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.sql.SQLException
java.net.MalformedURLException
public java.sql.Connection getConnection(java.lang.String curDriver, java.lang.String curCharset, java.lang.String curTrustStore) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.net.MalformedURLException, java.sql.SQLException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.net.MalformedURLException
java.sql.SQLException
public static java.lang.String expandSysPropVars(java.lang.String inString)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |