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.Object
Builder 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 UdfFunctionConfig
build()
Builds the UdfFunctionConfig with aparentPath
ofnull
.UdfFunctionConfig
build(java.lang.String parentPath)
Builds the UdfFunctionConfig.static UdfFunctionConfig
buildUdfFunctionConfig(java.util.function.Consumer<UdfFunctionConfigBuilder> builderSetup)
Builds aUdfFunctionConfig
in-placeUdfFunctionConfigBuilder
clear()
Clears all values from the builderjava.util.Map<UdfFunctionConfig.Field,java.lang.Object>
getValues()
UdfFunctionConfigBuilder
putAll(java.util.Map<UdfFunctionConfig.Field,java.lang.Object> values)
Puts all values from the given map into this builder.UdfFunctionConfigBuilder
putAll(UdfFunctionConfig config)
Puts all values from the given config into this builderUdfFunctionConfigBuilder
setArguments(java.lang.Object... arguments)
list of argumentsUdfFunctionConfigBuilder
setArguments(java.util.List<?> arguments)
list of argumentsUdfFunctionConfigBuilder
setFunctionName(java.lang.String functionName)
name of the function used as identifier in PGXUdfFunctionConfigBuilder
setImplementationReference(java.lang.String implementationReference)
reference to the UDF implementation on the classpathUdfFunctionConfigBuilder
setLanguage(UdfLanguage language)
language the function is implemented inUdfFunctionConfigBuilder
setNamespace(java.lang.String namespace)
namespace of the function in PGXUdfFunctionConfigBuilder
setReturnType(PropertyType returnType)
return type of the functionUdfFunctionConfigBuilder
setSourceCode(java.lang.String sourceCode)
source code of the function provided inlineUdfFunctionConfigBuilder
setSourceFunctionName(java.lang.String sourceFunctionName)
name of the function in the source languageUdfFunctionConfigBuilder
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:
)java.io.InputStream
toInputStream()
java.lang.String
toString()
-
-
-
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 aUdfFunctionConfig
in-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 aparentPath
ofnull
.- Returns:
- An instance of UdfFunctionConfig
- See Also:
build(String)
-
toInputStream
public java.io.InputStream toInputStream()
- Returns:
- an
InputStream
representing 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:
toString
in 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
-
-