T
- which entity provider configuration object this builder will producepublic abstract class AbstractEntityProviderConfigBuilder<T extends AbstractEntityProviderConfigBuilder<T,GTC>,GTC extends EntityProviderConfig>
extends java.lang.Object
implements oracle.pgx.config.internal.ConvertibleToEntityProviderConfigBuilder
Constructor and Description |
---|
AbstractEntityProviderConfigBuilder()
default constructor
|
Modifier and Type | Method and Description |
---|---|
T |
addAttribute(java.lang.String key, java.lang.String value)
Adds a specific additional attribute to this config
|
T |
addProperty(java.lang.String name, PropertyType type)
Convenience method for
addProperty(String, PropertyType, Object) . |
T |
addProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal)
Add a property to this builder
|
T |
addProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal, java.lang.Object column)
Add a property to this builder
|
T |
addStringProperty(java.lang.String name, java.lang.Object defaultVal, int dimension, java.lang.Object column, StringPoolingStrategy stringPoolingStrategy, java.lang.Integer maxDistinctStringPerPool)
Add a string property to the builder
|
T |
addStringProperty(java.lang.String name, java.lang.Object defaultVal, StringPoolingStrategy stringPoolingStrategy, java.lang.Integer maxDistinctStringPerPool)
Convenience method for
addStringProperty(String, Object, int, Object, StringPoolingStrategy, Integer) . |
T |
addVectorProperty(java.lang.String name, PropertyType type, int dimension)
Add a property to this builder
|
T |
addVectorProperty(java.lang.String name, PropertyType type, int dimension, java.lang.Object defaultVal)
Add a property to this builder
|
T |
addVectorProperty(java.lang.String name, PropertyType type, int dimension, java.lang.Object defaultVal, java.lang.Object column)
Add a property to this builder
|
GTC |
build()
Build the provider configuration object
|
T |
clearProperties()
Removes all properties from this builder
|
T |
copyBaseFrom(EntityProviderConfig providerConfig)
Sets this builder with the values of the given provider config, this only includes base settings (format, temporal formats, vertex properties, edge properties, loading configuration and error handling configuration).
|
T |
copyFrom(GTC providerConfig)
Sets this builder with all the values of the given provider config.
|
T |
createKeyMapping(boolean flag)
Sets the flag to create the entity key mapping.
|
T |
redactPassword() |
T |
removeProperty(java.lang.String name)
Removes a property from this builder
|
T |
setDestinationVertexProvider(java.lang.String name)
Sets the name of the destination vertex provider
|
T |
setErrorHandlingOnMissedPropKey(OnMismatch action)
Sets the error handling on missed prop key.
|
T |
setErrorHandlingOnMissingVertex(OnMissingVertex action)
Sets the error handling on a missing vertex.
|
T |
setErrorHandlingOnParsingIssue(OnMismatch action)
Sets the error handling on a parsing issue.
|
T |
setErrorHandlingOnPropConversion(OnMismatch action)
Sets the error handling on prop conversion.
|
T |
setErrorHandlingOnTypeMismatch(OnMismatch action)
Sets the error handling on type mismatch.
|
T |
setErrorHandlingOnVectorLengthMismatch(OnMismatch action)
Sets the error handling on vector length mismatch.
|
T |
setHasKeys(boolean hasKeys)
Sets the flag indicating if the provider data has keys or not
|
T |
setKeystoreAlias(java.lang.String keystoreAlias)
Sets the keystore alias.
|
T |
setKeyType(IdType keyType)
Sets the type of vertex keys
|
T |
setLabel(java.lang.String label)
Sets a custom label for the entities from this provider
|
T |
setLocalDateFormat(java.util.List<java.lang.String> localDateFormatList)
Sets the list of local_date formats used for loading and storing the provider.
|
T |
setName(java.lang.String name)
Sets the name of the provider
|
T |
setPassword(java.lang.String password)
Sets the password.
|
T |
setSourceVertexProvider(java.lang.String name)
Sets the name of the source vertex provider
|
T |
setStrictMode(boolean strictMode)
Sets the strict mode.
|
T |
setTimeFormat(java.util.List<java.lang.String> timeFormatList)
Sets the list of time formats used for loading and storing the provider.
|
T |
setTimestampFormat(java.util.List<java.lang.String> timestampFormatList)
Sets the list timestamp formats used for loading and storing the provider.
|
T |
setTimestampWithTimezoneFormat(java.util.List<java.lang.String> timestampWithTimezoneFormatList)
Sets the list of timestamp with timezone formats used for loading and storing the provider.
|
T |
setTimeWithTimezoneFormat(java.util.List<java.lang.String> timeWithTimezoneFormatList)
Sets the list of time with timezone formats used for loading and storing the provider.
|
public AbstractEntityProviderConfigBuilder()
public T addAttribute(java.lang.String key, java.lang.String value)
key
- the attribute's keyvalue
- the attribute's valuepublic T addProperty(java.lang.String name, PropertyType type)
addProperty(String, PropertyType, Object)
.name
- the name of the propertytype
- the type of the propertypublic T addProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal)
name
- the name of the propertytype
- the type of the propertydefaultVal
- the default value of the property (can be null
)public T addProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal, java.lang.Object column)
name
- the name of the propertytype
- the type of the propertydefaultVal
- the default value of the property (can be null
)column
- the column of the propertypublic T addStringProperty(java.lang.String name, java.lang.Object defaultVal, int dimension, java.lang.Object column, StringPoolingStrategy stringPoolingStrategy, java.lang.Integer maxDistinctStringPerPool)
name
- the name of the vertex propertydimension
- the dimension of the vertex propertydefaultVal
- the default value of the vertex property (can be null
)column
- the column of the vertex propertystringPoolingStrategy
- which string pooling strategy to usemaxDistinctStringPerPool
- the amount of distinct strings per property after which to stop poolingpublic T addStringProperty(java.lang.String name, java.lang.Object defaultVal, StringPoolingStrategy stringPoolingStrategy, java.lang.Integer maxDistinctStringPerPool)
addStringProperty(String, Object, int, Object, StringPoolingStrategy, Integer)
.name
- the name of the vertex propertydefaultVal
- the default value of the vertex property (can be null
)stringPoolingStrategy
- which string pooling strategy to usemaxDistinctStringPerPool
- the amount of distinct strings per property after which to stop poolingpublic T addVectorProperty(java.lang.String name, PropertyType type, int dimension)
name
- the name of the propertytype
- the type of the propertydimension
- the vector dimension of the propertypublic T addVectorProperty(java.lang.String name, PropertyType type, int dimension, java.lang.Object defaultVal)
name
- the name of the propertytype
- the type of the propertydimension
- the vector dimension of the propertydefaultVal
- the default value of the property (can be null
)public T addVectorProperty(java.lang.String name, PropertyType type, int dimension, java.lang.Object defaultVal, java.lang.Object column)
name
- the name of the propertytype
- the type of the propertydimension
- the vector dimension of the propertydefaultVal
- the default value of the property (can be null
)column
- the column of the propertypublic final GTC build()
public T clearProperties()
public final T copyBaseFrom(EntityProviderConfig providerConfig)
providerConfig
- the provider configuration from which to copy the valuespublic T copyFrom(GTC providerConfig)
providerConfig
- the provider configuration from which to copy the valuespublic T createKeyMapping(boolean flag)
flag
- if true
, an entity key mapping is createdpublic T redactPassword()
public T removeProperty(java.lang.String name)
name
- the name of the propertypublic T setDestinationVertexProvider(java.lang.String name)
name
- the name of the destination vertex providerpublic T setErrorHandlingOnMissedPropKey(OnMismatch action)
action
- the actionpublic T setErrorHandlingOnMissingVertex(OnMissingVertex action)
action
- the actionpublic T setErrorHandlingOnParsingIssue(OnMismatch action)
action
- the actionpublic T setErrorHandlingOnPropConversion(OnMismatch action)
action
- the actionpublic T setErrorHandlingOnTypeMismatch(OnMismatch action)
action
- the actionpublic T setErrorHandlingOnVectorLengthMismatch(OnMismatch action)
action
- the actionpublic T setHasKeys(boolean hasKeys)
hasKeys
- flag indicating if the provider data has keyspublic T setKeystoreAlias(java.lang.String keystoreAlias)
keystoreAlias
- the keystore alias.public T setKeyType(IdType keyType)
keyType
- the type of vertex keyspublic T setLabel(java.lang.String label)
If no custom label is specified, the label for the entities from this provider defaults to the provider name
label
- the custom labelpublic T setLocalDateFormat(java.util.List<java.lang.String> localDateFormatList)
localDateFormatList
- the list of date formatspublic T setName(java.lang.String name)
name
- the name of the providerpublic T setPassword(java.lang.String password)
password
- the password.public T setSourceVertexProvider(java.lang.String name)
name
- the name of the source vertex providerpublic T setStrictMode(boolean strictMode)
strictMode
- if true
, strict mode is enabled, otherwise strict mode is disabledpublic T setTimeFormat(java.util.List<java.lang.String> timeFormatList)
timeFormatList
- the list of date formatspublic T setTimestampFormat(java.util.List<java.lang.String> timestampFormatList)
timestampFormatList
- the list of date formatspublic T setTimestampWithTimezoneFormat(java.util.List<java.lang.String> timestampWithTimezoneFormatList)
timestampWithTimezoneFormatList
- the list of date formatspublic T setTimeWithTimezoneFormat(java.util.List<java.lang.String> timeWithTimezoneFormatList)
timeWithTimezoneFormatList
- the list of date formatsCopyright © 2010, 2020 Oracle and/or its affiliates. All Rights Reserved.