Class JdbcDataSourceConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JdbcDataSourceConfig>
java.lang.Object
io.helidon.data.sql.common.ConnectionConfig.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.data.sql.datasource.jdbc.JdbcDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,
,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
JdbcDataSourceConfig.Builder
- Enclosing interface:
JdbcDataSourceConfig
public abstract static class JdbcDataSourceConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JdbcDataSourceConfig>
extends ConnectionConfig.BuilderBase<BUILDER,PROTOTYPE>
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
JdbcDataSourceConfig
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class io.helidon.data.sql.common.ConnectionConfig.BuilderBase
ConnectionConfig.BuilderBase.ConnectionConfigImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddProperties
(Map<String, String> properties) Add properties (name/value pair) that will be used to configure the DataSource/Driver.Set the default auto-commit behavior of create connections.autoCommit
(boolean autoCommit) Set the default auto-commit behavior of create connections.catalog()
Set the default catalog name to be set on connections.Set the default catalog name to be set on connections.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.config()
If this instance was configured, this would be the config instance used.Deprecated.Update builder from configuration (node of this type).from
(JdbcDataSourceConfig prototype) Update this builder from an existing prototype instance.from
(JdbcDataSourceConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.name()
Name of this provider.Name of this provider.protected void
Handles providers and decorators.Add properties (name/value pair) that will be used to configure the DataSource/Driver.properties
(Map<String, String> properties) Add properties (name/value pair) that will be used to configure the DataSource/Driver.putProperty
(String key, String property) Add properties (name/value pair) that will be used to configure the DataSource/Driver.readOnly()
Whether the connection should be read only.readOnly
(boolean readOnly) Whether the connection should be read only.schema()
Set the default schema name to be set on connections.Set the default schema name to be set on connections.toString()
Set the default transaction isolation level.transactionIsolation
(TransactionIsolation transactionIsolation) Set the default transaction isolation level.protected void
Validates required properties.Methods inherited from class io.helidon.data.sql.common.ConnectionConfig.BuilderBase
clearJdbcDriverClassName, clearPassword, clearUsername, from, from, jdbcDriverClassName, jdbcDriverClassName, password, password, password, url, url, username, username
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig> - Overrides:
config
in classConnectionConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig> - Overrides:
config
in classConnectionConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
name
Name of this provider.- Parameters:
name
- the provider name- Returns:
- updated builder instance
- See Also:
-
clearAutoCommit
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
autoCommit
Set the default auto-commit behavior of create connections.- Parameters:
autoCommit
- the desired auto-commit default for connections- Returns:
- updated builder instance
- See Also:
-
clearCatalog
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
catalog
Set the default catalog name to be set on connections.- Parameters:
catalog
- the default catalog name- Returns:
- updated builder instance
- See Also:
-
clearReadOnly
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
readOnly
Whether the connection should be read only.- Parameters:
readOnly
- if read only- Returns:
- updated builder instance
- See Also:
-
clearSchema
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
schema
Set the default schema name to be set on connections.- Parameters:
schema
- the name of the default schema- Returns:
- updated builder instance
- See Also:
-
clearTransactionIsolation
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
transactionIsolation
Set the default transaction isolation level.- Parameters:
transactionIsolation
- the isolation level- Returns:
- updated builder instance
- See Also:
-
properties
Add properties (name/value pair) that will be used to configure the DataSource/Driver. Property values are limited toString
values. This method replaces all values with the new ones.- Parameters:
properties
- the properties- Returns:
- updated builder instance
- See Also:
-
addProperties
Add properties (name/value pair) that will be used to configure the DataSource/Driver. Property values are limited toString
values. This method keeps existing values, then puts all new values into the map.- Parameters:
properties
- the properties- Returns:
- updated builder instance
- See Also:
-
putProperty
Add properties (name/value pair) that will be used to configure the DataSource/Driver. Property values are limited toString
values. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceproperty
- new value for the key- Returns:
- updated builder instance
- See Also:
-
name
Name of this provider.- Returns:
- the name
-
autoCommit
Set the default auto-commit behavior of create connections.- Returns:
- the auto commit
-
catalog
Set the default catalog name to be set on connections.- Returns:
- the catalog
-
readOnly
Whether the connection should be read only.- Returns:
- the read only
-
schema
Set the default schema name to be set on connections.- Returns:
- the schema
-
transactionIsolation
Set the default transaction isolation level.- Returns:
- the transaction isolation
-
properties
Add properties (name/value pair) that will be used to configure the DataSource/Driver. Property values are limited toString
values.- Returns:
- the properties
-
config
If this instance was configured, this would be the config instance used.- Overrides:
config
in classConnectionConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig> - Returns:
- config node used to configure this builder, or empty if not configured
-
toString
- Overrides:
toString
in classConnectionConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototype
in classConnectionConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototype
in classConnectionConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig>
-
config(io.helidon.config.Config)