public class SQLDBConfig extends Object implements com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
oracle.jdbc.OracleDriver
as your JDBC Driver, then this will
automatically generate a connectionString, otherwise it must be specified manually and host, port, and db fields
can be omitted.
DriverManager
's default logic will be used to determine which Driver
to use for
a given connection string.Constructor and Description |
---|
SQLDBConfig(String connectionString,
Map<String,String> properties) |
SQLDBConfig(String connectionString,
String username,
String password,
Map<String,String> properties) |
SQLDBConfig(String host,
String port,
String db,
String username,
String password,
Map<String,String> properties) |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Constructs a connection based on the object fields.
|
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance |
getProvenance() |
Statement |
getStatement()
Constructs a statement based on the object fields.
|
void |
postConfig()
Used by the OLCUT configuration system, and should not be called by external code.
|
String |
toString() |
public SQLDBConfig(String connectionString, String username, String password, Map<String,String> properties)
public SQLDBConfig(String host, String port, String db, String username, String password, Map<String,String> properties)
public void postConfig()
postConfig
in interface com.oracle.labs.mlrg.olcut.config.Configurable
public Connection getConnection() throws SQLException
SQLException
- If the connection failed.public Statement getStatement() throws SQLException
SQLException
- If the connection failed.public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.