public abstract static class JdbcIO.DataSourceConfiguration
extends java.lang.Object
implements java.io.Serializable
DataSource
, either providing directly a DataSource
or all
properties allowing to create a DataSource
.Constructor and Description |
---|
DataSourceConfiguration() |
Modifier and Type | Method and Description |
---|---|
static JdbcIO.DataSourceConfiguration |
create(javax.sql.DataSource dataSource) |
static JdbcIO.DataSourceConfiguration |
create(java.lang.String driverClassName,
java.lang.String url) |
static JdbcIO.DataSourceConfiguration |
create(ValueProvider<java.lang.String> driverClassName,
ValueProvider<java.lang.String> url) |
JdbcIO.DataSourceConfiguration |
withConnectionProperties(java.lang.String connectionProperties)
Sets the connection properties passed to driver.connect(...).
|
JdbcIO.DataSourceConfiguration |
withConnectionProperties(ValueProvider<java.lang.String> connectionProperties)
Same as
withConnectionProperties(String) but accepting a ValueProvider. |
JdbcIO.DataSourceConfiguration |
withPassword(java.lang.String password) |
JdbcIO.DataSourceConfiguration |
withPassword(ValueProvider<java.lang.String> password) |
JdbcIO.DataSourceConfiguration |
withUsername(java.lang.String username) |
JdbcIO.DataSourceConfiguration |
withUsername(ValueProvider<java.lang.String> username) |
public static JdbcIO.DataSourceConfiguration create(javax.sql.DataSource dataSource)
public static JdbcIO.DataSourceConfiguration create(java.lang.String driverClassName, java.lang.String url)
public static JdbcIO.DataSourceConfiguration create(ValueProvider<java.lang.String> driverClassName, ValueProvider<java.lang.String> url)
public JdbcIO.DataSourceConfiguration withUsername(java.lang.String username)
public JdbcIO.DataSourceConfiguration withUsername(ValueProvider<java.lang.String> username)
public JdbcIO.DataSourceConfiguration withPassword(java.lang.String password)
public JdbcIO.DataSourceConfiguration withPassword(ValueProvider<java.lang.String> password)
public JdbcIO.DataSourceConfiguration withConnectionProperties(java.lang.String connectionProperties)
NOTE - The "user" and "password" properties can be add via withUsername(String)
,
withPassword(String)
, so they do not need to be included here.
public JdbcIO.DataSourceConfiguration withConnectionProperties(ValueProvider<java.lang.String> connectionProperties)
withConnectionProperties(String)
but accepting a ValueProvider.