Module io.helidon.dbclient.jdbc
Package io.helidon.dbclient.jdbc
Class JdbcParametersConfig.BuilderBase<BUILDER extends JdbcParametersConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JdbcParametersConfig>
java.lang.Object
io.helidon.dbclient.jdbc.JdbcParametersConfig.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:
JdbcParametersConfig.Builder
- Enclosing interface:
JdbcParametersConfig
public abstract static class JdbcParametersConfig.BuilderBase<BUILDER extends JdbcParametersConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JdbcParametersConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
JdbcParametersConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfig()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).from(JdbcParametersConfig prototype) Update this builder from an existing prototype instance.from(JdbcParametersConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.protected voidHandles providers and decorators.booleanSet alljava.timeDate/Time values directly usingPreparedStatement.setObject(int, Object).setObjectForJavaTime(boolean setObjectForJavaTime) Set alljava.timeDate/Time values directly usingPreparedStatement.setObject(int, Object).intStringvalues with length above this limit will be bound usingPreparedStatement.setCharacterStream(int, java.io.Reader, int)ifuseStringBinding()is set totrue.stringBindingSize(int stringBindingSize) Stringvalues with length above this limit will be bound usingPreparedStatement.setCharacterStream(int, java.io.Reader, int)ifuseStringBinding()is set totrue.booleanUsePreparedStatement.setTimestamp(int, java.sql.Timestamp)to setLocalTimevalues whentrueor usePreparedStatement.setTime(int, java.sql.Time)whenfalse.timestampForLocalTime(boolean timestampForLocalTime) UsePreparedStatement.setTimestamp(int, java.sql.Timestamp)to setLocalTimevalues whentrueor usePreparedStatement.setTime(int, java.sql.Time)whenfalse.toString()booleanUsePreparedStatement.setBinaryStream(int, java.io.InputStream, int)binding forbyte[]values.useByteArrayBinding(boolean useByteArrayBinding) UsePreparedStatement.setBinaryStream(int, java.io.InputStream, int)binding forbyte[]values.booleanuseNString(boolean useNString) booleanUsePreparedStatement.setCharacterStream(int, java.io.Reader, int)binding forStringvalues with length abovestringBindingSize()limit.useStringBinding(boolean useStringBinding) UsePreparedStatement.setCharacterStream(int, java.io.Reader, int)binding forStringvalues with length abovestringBindingSize()limit.protected voidValidates required properties.Methods 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 JdbcParametersConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JdbcParametersConfig> - 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 JdbcParametersConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JdbcParametersConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
useNString
- Parameters:
useNString- whether NStringconversion is used- Returns:
- updated builder instance
- See Also:
-
useStringBinding
UsePreparedStatement.setCharacterStream(int, java.io.Reader, int)binding forStringvalues with length abovestringBindingSize()limit. Default value istrue.- Parameters:
useStringBinding- whether to useCharArrayReaderbinding- Returns:
- updated builder instance
- See Also:
-
stringBindingSize
Stringvalues with length above this limit will be bound usingPreparedStatement.setCharacterStream(int, java.io.Reader, int)ifuseStringBinding()is set totrue. Default value is1024.- Parameters:
stringBindingSize-Stringvalues length limit forCharArrayReaderbinding- Returns:
- updated builder instance
- See Also:
-
useByteArrayBinding
UsePreparedStatement.setBinaryStream(int, java.io.InputStream, int)binding forbyte[]values. Default value istrue.- Parameters:
useByteArrayBinding- whether to useByteArrayInputStreambinding- Returns:
- updated builder instance
- See Also:
-
timestampForLocalTime
UsePreparedStatement.setTimestamp(int, java.sql.Timestamp)to setLocalTimevalues whentrueor usePreparedStatement.setTime(int, java.sql.Time)whenfalse. Default value istrue.This option is vendor specific. Most of the databases are fine with
Timestamp, but for example SQL Server requiresTime. This option does not apply whensetObjectForJavaTime()is set totrue. -
setObjectForJavaTime
Set alljava.timeDate/Time values directly usingPreparedStatement.setObject(int, Object). This option shall work fine for recent JDBC drivers. Default value istrue.- Parameters:
setObjectForJavaTime- whether to usePreparedStatement.setObject(int, Object)forjava.timeDate/Time values- Returns:
- updated builder instance
- See Also:
-
useNString
public boolean useNString()- Returns:
- whether N
Stringconversion is used
-
useStringBinding
public boolean useStringBinding()UsePreparedStatement.setCharacterStream(int, java.io.Reader, int)binding forStringvalues with length abovestringBindingSize()limit. Default value istrue.- Returns:
- whether to use
CharArrayReaderbinding
-
stringBindingSize
public int stringBindingSize()Stringvalues with length above this limit will be bound usingPreparedStatement.setCharacterStream(int, java.io.Reader, int)ifuseStringBinding()is set totrue. Default value is1024.- Returns:
Stringvalues length limit forCharArrayReaderbinding
-
useByteArrayBinding
public boolean useByteArrayBinding()UsePreparedStatement.setBinaryStream(int, java.io.InputStream, int)binding forbyte[]values. Default value istrue.- Returns:
- whether to use
ByteArrayInputStreambinding
-
timestampForLocalTime
public boolean timestampForLocalTime()UsePreparedStatement.setTimestamp(int, java.sql.Timestamp)to setLocalTimevalues whentrueor usePreparedStatement.setTime(int, java.sql.Time)whenfalse. Default value istrue.This option is vendor specific. Most of the databases are fine with
Timestamp, but for example SQL Server requiresTime. This option does not apply whensetObjectForJavaTime()is set totrue. -
setObjectForJavaTime
public boolean setObjectForJavaTime()Set alljava.timeDate/Time values directly usingPreparedStatement.setObject(int, Object). This option shall work fine for recent JDBC drivers. Default value istrue.- Returns:
- whether to use
PreparedStatement.setObject(int, Object)forjava.timeDate/Time values
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
Configuration used to configure this instance.- Returns:
- config instance
-
config(io.helidon.config.Config)