The file src/org/hsqldb/sample/SqlFileEmbedder.java
in the HSQLDB distribution provides an example of how to use RCData for your
own programs.
org.hsqldb.sample.SqlFileEmbedder
| Modifier and Type | Field and Description |
|---|---|
| public String | |
| public static final String | |
| private String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | RCData(String
The identifier for these connection settings id, String The URL of the database to connect to url, String The username to log in as username, String The password of the username password, String The JDBC driver to use driver, String The character set to use charset, String The trust store to use truststore, String The JDBC library to add to CLASSPATH libpath, String The transaction level ti)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| public static String | Returns: formatted stringString inString)Returns a copy of the given String with System property names in the
format |
| public Connection | Returns: New JDBC ConnectionGets a JDBC Connection using the data of this RCData object. |
| public Connection | Returns: New JDBC Connectiondriver curDriverIn, String trusted store curTrustStoreIn)Gets a JDBC Connection using the data of this RCData object with specified override elements |
| public String | |
| public void | |
| public static void | setTI(Connection c, String tiString)
Set Transaction Isolation level on the specified JDBC Connection |
| public static String | Returns: The string representationTransaction levle ti)Return a String representation for the given numerical java.sql.Connection Transaction level. |
| public String |
| charset | back to summary |
|---|---|
| public String charset | |
| DEFAULT_JDBC_DRIVER | back to summary |
|---|---|
| public static final String DEFAULT_JDBC_DRIVER | |
| defaultJdbcDriverName | back to summary |
|---|---|
| private String defaultJdbcDriverName | |
| driver | back to summary |
|---|---|
| public String driver | |
| id | back to summary |
|---|---|
| public String id | |
| libpath | back to summary |
|---|---|
| public String libpath | |
| password | back to summary |
|---|---|
| public String password | |
| ti | back to summary |
|---|---|
| public String ti | |
| truststore | back to summary |
|---|---|
| public String truststore | |
| url | back to summary |
|---|---|
| public String url | |
| username | back to summary |
|---|---|
| public String username | |
| RCData | back to summary |
|---|---|
| public RCData(File file, String dbKey) throws Exception Creates a RCDataObject by looking up the given key in the given authentication file. | |
| RCData | back to summary |
|---|---|
| public RCData(String id, String url, String username, String password, String driver, String charset, String truststore) throws Exception Convenience constructor for backward compatibility. | |
| RCData | back to summary |
|---|---|
| public RCData(String id, String url, String username, String password, String driver, String charset, String truststore, String libpath) throws Exception Wrapper for unset Transaction Isolation. | |
| RCData | back to summary |
|---|---|
| public RCData(String id, String url, String username, String password, String driver, String charset, String truststore, String libpath, String ti) throws Exception Creates a new
The parameters driver, charset, truststore, and libpath are optional.
Setting these parameters to
| |
| angleBracketNull | back to summary |
|---|---|
| private static String angleBracketNull(final String s) | |
| expandSysPropVars | back to summary |
|---|---|
| public static String expandSysPropVars(String inString) Returns a copy of the given String with System property names in the
format | |
| getConnection | back to summary |
|---|---|
| public Connection getConnection() throws SQLException, MalformedURLException Gets a JDBC Connection using the data of this RCData object.
| |
| getConnection | back to summary |
|---|---|
| public Connection getConnection(String curDriverIn, String curTrustStoreIn) throws MalformedURLException, SQLException Gets a JDBC Connection using the data of this RCData object with specified override elements
| |
| getDefaultJdbcDriverName | back to summary |
|---|---|
| public String getDefaultJdbcDriverName() | |
| setDefaultJdbcDriver | back to summary |
|---|---|
| public void setDefaultJdbcDriver(String defaultJdbcDriverName) | |
| setTI | back to summary |
|---|---|
| public static void setTI(Connection c, String tiString) throws SQLException Set Transaction Isolation level on the specified JDBC Connection | |
| tiToString | back to summary |
|---|---|
| public static String tiToString(int ti) Return a String representation for the given numerical java.sql.Connection Transaction level. Database implementations are free to provide their own transaction isolation levels, so you can't depend upon this method too much.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |