- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
JdbcParametersConfig.BuilderBase.JdbcParametersConfigImpl
JDBC parameters setter configuration.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forJdbcParametersConfig
.static class
JdbcParametersConfig.BuilderBase<BUILDER extends JdbcParametersConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends JdbcParametersConfig> Fluent API builder base forJdbcParametersConfig
. -
Method Summary
Modifier and TypeMethodDescriptionstatic JdbcParametersConfig.Builder
builder()
Create a new fluent API builder to customize configuration.static JdbcParametersConfig.Builder
builder
(JdbcParametersConfig instance) Create a new fluent API builder from an existing instance.static JdbcParametersConfig
create()
Create a new instance with default values.static JdbcParametersConfig
Create a new instance from configuration.boolean
Set alljava.time
Date/Time values directly usingPreparedStatement.setObject(int, Object)
.int
String
values with length above this limit will be bound usingPreparedStatement.setCharacterStream(int, java.io.Reader, int)
ifuseStringBinding()
is set totrue
.boolean
UsePreparedStatement.setTimestamp(int, java.sql.Timestamp)
to setLocalTime
values whentrue
or usePreparedStatement.setTime(int, java.sql.Time)
whenfalse
.boolean
UsePreparedStatement.setBinaryStream(int, java.io.InputStream, int)
binding forbyte[]
values.boolean
boolean
UsePreparedStatement.setCharacterStream(int, java.io.Reader, int)
binding forString
values with length abovestringBindingSize()
limit.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
useNString
boolean useNString()- Returns:
- whether N
String
conversion is used
-
useStringBinding
boolean useStringBinding()UsePreparedStatement.setCharacterStream(int, java.io.Reader, int)
binding forString
values with length abovestringBindingSize()
limit. Default value istrue
.- Returns:
- whether to use
CharArrayReader
binding
-
stringBindingSize
int stringBindingSize()String
values with length above this limit will be bound usingPreparedStatement.setCharacterStream(int, java.io.Reader, int)
ifuseStringBinding()
is set totrue
. Default value is1024
.- Returns:
String
values length limit forCharArrayReader
binding
-
useByteArrayBinding
boolean useByteArrayBinding()UsePreparedStatement.setBinaryStream(int, java.io.InputStream, int)
binding forbyte[]
values. Default value istrue
.- Returns:
- whether to use
ByteArrayInputStream
binding
-
timestampForLocalTime
boolean timestampForLocalTime()UsePreparedStatement.setTimestamp(int, java.sql.Timestamp)
to setLocalTime
values whentrue
or 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
boolean setObjectForJavaTime()Set alljava.time
Date/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.time
Date/Time values
-