public class DatabaseConnectionFactory
extends java.lang.Object
| Constructor and Description |
|---|
DatabaseConnectionFactory(com.mirth.connect.server.util.javascript.MirthContextFactory contextFactory) |
| Modifier and Type | Method and Description |
|---|---|
java.sql.Connection |
createConnection(java.lang.String driver,
java.lang.String address,
java.lang.String username,
java.lang.String password)
Instantiates and returns a new java.sql.Connection object with the given connection
parameters.
|
DatabaseConnection |
createDatabaseConnection(java.lang.String driver,
java.lang.String address)
Instantiates and returns a new DatabaseConnection object with the given connection
parameters.
|
DatabaseConnection |
createDatabaseConnection(java.lang.String driver,
java.lang.String address,
java.lang.String username,
java.lang.String password)
Instantiates and returns a new DatabaseConnection object with the given connection
parameters.
|
void |
initializeDriver(java.lang.String driver)
Initializes the specified JDBC driver.
|
public DatabaseConnectionFactory(com.mirth.connect.server.util.javascript.MirthContextFactory contextFactory)
public DatabaseConnection createDatabaseConnection(java.lang.String driver, java.lang.String address, java.lang.String username, java.lang.String password) throws java.sql.SQLException
driver - The JDBC driver class (as a string) to use to create the connection with.address - The server address to connect to.username - The username to connect with.password - The password to connect with.java.sql.SQLExceptionpublic DatabaseConnection createDatabaseConnection(java.lang.String driver, java.lang.String address) throws java.sql.SQLException
driver - The JDBC driver class (as a string) to use to create the connection with.address - The server address to connect to.java.sql.SQLExceptionpublic java.sql.Connection createConnection(java.lang.String driver,
java.lang.String address,
java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
driver - The JDBC driver class (as a string) to use to create the connection with.address - The server address to connect to.username - The username to connect with.password - The password to connect with.java.sql.SQLExceptionpublic void initializeDriver(java.lang.String driver)
throws java.lang.Exception
driver - The JDBC driver class (as a string) to initialize.java.lang.Exception