Package oracle.pgx.config
Class PreparedQueryConfigBuilder
- java.lang.Object
-
- oracle.pgx.config.PreparedQueryConfigBuilder
-
@Generated({"common/config/src/templates/ConfigBuilder.stg","common/config/config.gradle"}) public final class PreparedQueryConfigBuilder extends java.lang.Object
Builder forPreparedQueryConfig
.
-
-
Constructor Summary
Constructors Constructor Description PreparedQueryConfigBuilder()
Constructs an empty PreparedQueryConfigBuilderPreparedQueryConfigBuilder(java.util.Map<PreparedQueryConfig.Field,java.lang.Object> values)
Constructs a PreparedQueryConfigBuilder initialized with the values from the given mapPreparedQueryConfigBuilder(PreparedQueryConfig config)
Constructs a PreparedQueryConfigBuilder initialized with the values from the given configPreparedQueryConfigBuilder(PreparedQueryConfigBuilder builder)
Constructs a PreparedQueryConfigBuilder initialized with the values from the given builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PreparedQueryConfig
build()
Builds the PreparedQueryConfig with aparentPath
ofnull
.PreparedQueryConfig
build(java.lang.String parentPath)
Builds the PreparedQueryConfig.static PreparedQueryConfig
buildPreparedQueryConfig(java.util.function.Consumer<PreparedQueryConfigBuilder> builderSetup)
Builds aPreparedQueryConfig
in-placePreparedQueryConfigBuilder
clear()
Clears all values from the builderjava.util.Map<PreparedQueryConfig.Field,java.lang.Object>
getValues()
PreparedQueryConfigBuilder
putAll(java.util.Map<PreparedQueryConfig.Field,java.lang.Object> values)
Puts all values from the given map into this builder.PreparedQueryConfigBuilder
putAll(PreparedQueryConfig config)
Puts all values from the given config into this builderPreparedQueryConfigBuilder
setArguments(java.lang.Object... arguments)
arguments for the queryPreparedQueryConfigBuilder
setArguments(java.util.List<?> arguments)
arguments for the queryPreparedQueryConfigBuilder
setQuery(java.lang.String query)
query stringjava.io.InputStream
toInputStream()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PreparedQueryConfigBuilder
public PreparedQueryConfigBuilder()
Constructs an empty PreparedQueryConfigBuilder
-
PreparedQueryConfigBuilder
public PreparedQueryConfigBuilder(java.util.Map<PreparedQueryConfig.Field,java.lang.Object> values)
Constructs a PreparedQueryConfigBuilder initialized with the values from the given map- Parameters:
values
- a map containing configuration values
-
PreparedQueryConfigBuilder
public PreparedQueryConfigBuilder(PreparedQueryConfig config)
Constructs a PreparedQueryConfigBuilder initialized with the values from the given config- Parameters:
config
- the configuration to take the values from
-
PreparedQueryConfigBuilder
public PreparedQueryConfigBuilder(PreparedQueryConfigBuilder builder)
Constructs a PreparedQueryConfigBuilder initialized with the values from the given builder- Parameters:
builder
- the builder to take the values from
-
-
Method Detail
-
buildPreparedQueryConfig
public static PreparedQueryConfig buildPreparedQueryConfig(java.util.function.Consumer<PreparedQueryConfigBuilder> builderSetup)
Builds aPreparedQueryConfig
in-place- Parameters:
builderSetup
- a consumer to setup a newly createdPreparedQueryConfig
-
putAll
public PreparedQueryConfigBuilder putAll(java.util.Map<PreparedQueryConfig.Field,java.lang.Object> values)
Puts all values from the given map into this builder.- Parameters:
values
- the values to put in the builder
-
putAll
public PreparedQueryConfigBuilder putAll(PreparedQueryConfig config)
Puts all values from the given config into this builder- Parameters:
config
- the config to take the values from
-
clear
public PreparedQueryConfigBuilder clear()
Clears all values from the builder
-
build
public PreparedQueryConfig build(java.lang.String parentPath)
Builds the PreparedQueryConfig.- Parameters:
parentPath
- if not null, resolves relative paths against this parentPath- Returns:
- an instance of PreparedQueryConfig
-
build
public PreparedQueryConfig build()
Builds the PreparedQueryConfig with aparentPath
ofnull
.- Returns:
- An instance of PreparedQueryConfig
- See Also:
build(String)
-
toInputStream
public java.io.InputStream toInputStream()
- Returns:
- an
InputStream
representing the config
-
getValues
public java.util.Map<PreparedQueryConfig.Field,java.lang.Object> getValues()
- Returns:
- the raw config values
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setQuery
public PreparedQueryConfigBuilder setQuery(java.lang.String query)
query string
-
setArguments
public PreparedQueryConfigBuilder setArguments(java.lang.Object... arguments)
arguments for the query- Parameters:
arguments
- null
-
setArguments
public PreparedQueryConfigBuilder setArguments(java.util.List<?> arguments)
arguments for the query- Parameters:
arguments
- null
-
-