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 classGenerated 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 autoCommit.Clear existing value of catalog.Clear existing value of readOnly.Clear existing value of schema.Clear existing value of transactionIsolation.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 voidHandles 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 voidValidates required properties.Methods inherited from class io.helidon.data.sql.common.ConnectionConfig.BuilderBase
clearJdbcDriverClassName, clearPassword, clearUsername, config, from, from, jdbcDriverClassName, jdbcDriverClassName, password, password, password, url, url, username, usernameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig> - Overrides:
configin 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:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig> - Overrides:
configin 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 autoCommit.- 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 catalog.- 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 readOnly.- 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 schema.- 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 transactionIsolation.- 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 toStringvalues. 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 toStringvalues. 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 toStringvalues. 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 provider name
-
autoCommit
Set the default auto-commit behavior of create connections.- Returns:
- the desired auto-commit default for connections
-
catalog
Set the default catalog name to be set on connections.- Returns:
- the default catalog name
-
readOnly
Whether the connection should be read only.- Returns:
- if read only
-
schema
Set the default schema name to be set on connections.- Returns:
- the name of the default schema
-
transactionIsolation
Set the default transaction isolation level.- Returns:
- the isolation level
-
properties
Add properties (name/value pair) that will be used to configure the DataSource/Driver. Property values are limited toStringvalues.- Returns:
- the properties
-
toString
- Overrides:
toStringin classConnectionConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototypein classConnectionConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototypein classConnectionConfig.BuilderBase<BUILDER extends JdbcDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JdbcDataSourceConfig>
-
config(io.helidon.config.Config)