public class DriverManagerConnectionSpec extends AbstractConnectionSpec
DriverManager API.| Constructor and Description |
|---|
DriverManagerConnectionSpec(String url,
String user,
String password) |
DriverManagerConnectionSpec(String url,
String user,
String password,
boolean autoCommitEnabled)
Creates an instance with a specified JDBC URL, and a username and
password.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ConnectionSpecVisitor connectionSpecVisitor)
Performs some processing on this connection spec.
|
Connection |
getOrCreate()
Creates a database connection or gets an existing connection with
the JDBC URL, username and password specified in the constructor.
|
getDatabaseProduct, getDatabaseVersion, getDriver, getDriverVersion, isAutoCommitEnabledpublic DriverManagerConnectionSpec(String url, String user, String password)
public Connection getOrCreate() throws SQLException
Connection.SQLException - if an error occurred creating/getting a
Connection, possibly because the JDBC URL, username and/or
password are invalid.public void accept(ConnectionSpecVisitor connectionSpecVisitor)
connectionSpecVisitor - a ConnectionSpecVisitor.Copyright © 2012–2020 Emory University. All rights reserved.