Package oracle.pgx.config
Class UdfFunctionConfigBuilder
- java.lang.Object
-
- oracle.pgx.config.UdfFunctionConfigBuilder
-
@Generated({"common/config/src/templates/ConfigBuilder.stg","common/config/config.gradle"}) public final class UdfFunctionConfigBuilder extends java.lang.ObjectBuilder forUdfFunctionConfig.
-
-
Constructor Summary
Constructors Constructor Description UdfFunctionConfigBuilder()Constructs an empty UdfFunctionConfigBuilderUdfFunctionConfigBuilder(java.util.Map<UdfFunctionConfig.Field,java.lang.Object> values)Constructs a UdfFunctionConfigBuilder initialized with the values from the given mapUdfFunctionConfigBuilder(UdfFunctionConfig config)Constructs a UdfFunctionConfigBuilder initialized with the values from the given configUdfFunctionConfigBuilder(UdfFunctionConfigBuilder builder)Constructs a UdfFunctionConfigBuilder initialized with the values from the given builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UdfFunctionConfigbuild()Builds the UdfFunctionConfig with aparentPathofnull.UdfFunctionConfigbuild(java.lang.String parentPath)Builds the UdfFunctionConfig.static UdfFunctionConfigbuildUdfFunctionConfig(java.util.function.Consumer<UdfFunctionConfigBuilder> builderSetup)Builds aUdfFunctionConfigin-placeUdfFunctionConfigBuilderclear()Clears all values from the builderjava.util.Map<UdfFunctionConfig.Field,java.lang.Object>getValues()UdfFunctionConfigBuilderputAll(java.util.Map<UdfFunctionConfig.Field,java.lang.Object> values)Puts all values from the given map into this builder.UdfFunctionConfigBuilderputAll(UdfFunctionConfig config)Puts all values from the given config into this builderUdfFunctionConfigBuildersetArguments(java.lang.Object... arguments)list of argumentsUdfFunctionConfigBuildersetArguments(java.util.List<?> arguments)list of argumentsUdfFunctionConfigBuildersetFunctionName(java.lang.String functionName)name of the function used as identifier in PGXUdfFunctionConfigBuildersetImplementationReference(java.lang.String implementationReference)reference to the UDF implementation on the classpathUdfFunctionConfigBuildersetLanguage(UdfLanguage language)language the function is implemented inUdfFunctionConfigBuildersetNamespace(java.lang.String namespace)namespace of the function in PGXUdfFunctionConfigBuildersetReturnType(PropertyType returnType)return type of the functionUdfFunctionConfigBuildersetSourceCode(java.lang.String sourceCode)source code of the function provided inlineUdfFunctionConfigBuildersetSourceFunctionName(java.lang.String sourceFunctionName)name of the function in the source languageUdfFunctionConfigBuildersetSourceLocation(java.lang.String sourceLocation)source code of the function provided as a unified resource identifier, either pointing to a a local file (relative to the location of this config or absolute), a web resource (prefixhttp://'orhttps://), a HDFS path (deprecated) (prefixhdfs:) or a classpath (prefixclasspath:/orjar:)java.io.InputStreamtoInputStream()java.lang.StringtoString()
-
-
-
Constructor Detail
-
UdfFunctionConfigBuilder
public UdfFunctionConfigBuilder()
Constructs an empty UdfFunctionConfigBuilder
-
UdfFunctionConfigBuilder
public UdfFunctionConfigBuilder(java.util.Map<UdfFunctionConfig.Field,java.lang.Object> values)
Constructs a UdfFunctionConfigBuilder initialized with the values from the given map- Parameters:
values- a map containing configuration values
-
UdfFunctionConfigBuilder
public UdfFunctionConfigBuilder(UdfFunctionConfig config)
Constructs a UdfFunctionConfigBuilder initialized with the values from the given config- Parameters:
config- the configuration to take the values from
-
UdfFunctionConfigBuilder
public UdfFunctionConfigBuilder(UdfFunctionConfigBuilder builder)
Constructs a UdfFunctionConfigBuilder initialized with the values from the given builder- Parameters:
builder- the builder to take the values from
-
-
Method Detail
-
buildUdfFunctionConfig
public static UdfFunctionConfig buildUdfFunctionConfig(java.util.function.Consumer<UdfFunctionConfigBuilder> builderSetup)
Builds aUdfFunctionConfigin-place- Parameters:
builderSetup- a consumer to setup a newly createdUdfFunctionConfig
-
putAll
public UdfFunctionConfigBuilder putAll(java.util.Map<UdfFunctionConfig.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 UdfFunctionConfigBuilder putAll(UdfFunctionConfig config)
Puts all values from the given config into this builder- Parameters:
config- the config to take the values from
-
clear
public UdfFunctionConfigBuilder clear()
Clears all values from the builder
-
build
public UdfFunctionConfig build(java.lang.String parentPath)
Builds the UdfFunctionConfig.- Parameters:
parentPath- if not null, resolves relative paths against this parentPath- Returns:
- an instance of UdfFunctionConfig
-
build
public UdfFunctionConfig build()
Builds the UdfFunctionConfig with aparentPathofnull.- Returns:
- An instance of UdfFunctionConfig
- See Also:
build(String)
-
toInputStream
public java.io.InputStream toInputStream()
- Returns:
- an
InputStreamrepresenting the config
-
getValues
public java.util.Map<UdfFunctionConfig.Field,java.lang.Object> getValues()
- Returns:
- the raw config values
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setNamespace
public UdfFunctionConfigBuilder setNamespace(java.lang.String namespace)
namespace of the function in PGX
-
setFunctionName
public UdfFunctionConfigBuilder setFunctionName(java.lang.String functionName)
name of the function used as identifier in PGX
-
setLanguage
public UdfFunctionConfigBuilder setLanguage(UdfLanguage language)
language the function is implemented in
-
setSourceLocation
public UdfFunctionConfigBuilder setSourceLocation(java.lang.String sourceLocation)
source code of the function provided as a unified resource identifier, either pointing to a a local file (relative to the location of this config or absolute), a web resource (prefixhttp://'orhttps://), a HDFS path (deprecated) (prefixhdfs:) or a classpath (prefixclasspath:/orjar:)
-
setSourceCode
public UdfFunctionConfigBuilder setSourceCode(java.lang.String sourceCode)
source code of the function provided inline
-
setImplementationReference
public UdfFunctionConfigBuilder setImplementationReference(java.lang.String implementationReference)
reference to the UDF implementation on the classpath
-
setSourceFunctionName
public UdfFunctionConfigBuilder setSourceFunctionName(java.lang.String sourceFunctionName)
name of the function in the source language
-
setReturnType
public UdfFunctionConfigBuilder setReturnType(PropertyType returnType)
return type of the function
-
setArguments
public UdfFunctionConfigBuilder setArguments(java.lang.Object... arguments)
list of arguments- Parameters:
arguments- argument
-
setArguments
public UdfFunctionConfigBuilder setArguments(java.util.List<?> arguments)
list of arguments- Parameters:
arguments- argument
-
-