Package oracle.pgx.config
Class AbstractEntityProviderConfigBuilder<T extends AbstractEntityProviderConfigBuilder<T,GTC>,GTC extends EntityProviderConfig>
- java.lang.Object
-
- oracle.pgx.config.AbstractEntityProviderConfigBuilder<T,GTC>
-
- Type Parameters:
T
- which entity provider configuration object this builder will produce
- All Implemented Interfaces:
oracle.pgx.config.internal.ConvertibleToEntityProviderConfigBuilder
- Direct Known Subclasses:
EsEntityProviderConfigBuilder
,FileEntityProviderConfigBuilder
,RdbmsEntityProviderConfigBuilder
public abstract class AbstractEntityProviderConfigBuilder<T extends AbstractEntityProviderConfigBuilder<T,GTC>,GTC extends EntityProviderConfig> extends java.lang.Object implements oracle.pgx.config.internal.ConvertibleToEntityProviderConfigBuilder
base class for entity provider configuration builder classes
-
-
Constructor Summary
Constructors Constructor Description AbstractEntityProviderConfigBuilder()
default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
addAttribute(java.lang.String key, java.lang.String value)
Adds a specific additional attribute to this configT
addProperty(java.lang.String name, PropertyType type)
Convenience method foraddProperty(String, PropertyType, Object)
.T
addProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal)
Add a property to this builderT
addProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal, java.lang.Object column)
Add a property to this builderT
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 builderT
addStringProperty(java.lang.String name, java.lang.Object defaultVal, StringPoolingStrategy stringPoolingStrategy, java.lang.Integer maxDistinctStringPerPool)
Convenience method foraddStringProperty(String, Object, int, Object, StringPoolingStrategy, Integer)
.T
addVectorProperty(java.lang.String name, PropertyType type, int dimension)
Add a property to this builderT
addVectorProperty(java.lang.String name, PropertyType type, int dimension, java.lang.Object defaultVal)
Add a property to this builderT
addVectorProperty(java.lang.String name, PropertyType type, int dimension, java.lang.Object defaultVal, java.lang.Object column)
Add a property to this builderT
addVectorProperty(java.lang.String name, PropertyType type, int dimension, java.lang.Object defaultVal, java.lang.Object column, java.lang.Object field, java.lang.Object aggregate, java.lang.Object groupKey, java.lang.Object dropAfterLoading)
Add a property to this builderGTC
build()
Build the provider configuration objectT
clearProperties()
Removes all properties from this builderT
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
enableEdgeIdDuplicateCheck(boolean checkEdgeIdDuplicates)
Sets whether or not edge ID duplicates should be checked.T
enableVertexIdDuplicateCheck(boolean checkVertexIdDuplicates)
Sets whether or not vertex ID duplicates should be checked.T
redactPassword()
T
removeProperty(java.lang.String name)
Removes a property from this buildervoid
setDestinationVertexKeyType(IdType vertexIdType)
T
setDestinationVertexProvider(java.lang.String name)
Sets the name of the destination vertex providerT
setErrorHandlingOnDuplicateEntityId(OnMismatch action)
Sets the error handling on duplicated entity ID.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 notT
setKeystoreAlias(java.lang.String keystoreAlias)
Sets the keystore alias.T
setKeyType(IdType keyType)
Sets the type of vertex keysT
setLabel(java.lang.String label)
Sets a custom label for the entities from this providerT
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 providerT
setPassword(java.lang.String password)
Sets the password.void
setSourceVertexKeyType(IdType vertexIdType)
T
setSourceVertexProvider(java.lang.String name)
Sets the name of the source vertex providerT
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.
-
-
-
Method Detail
-
build
public final GTC build()
Build the provider configuration object- Returns:
- the provider configuration object
-
copyFrom
public T copyFrom(GTC providerConfig)
Sets this builder with all the values of the given provider config. If a format was already specified it will remain unchanged, however any other values copied from the given provider config will overwrite the corresponding values of this builder.- Parameters:
providerConfig
- the provider configuration from which to copy the values- Returns:
- this builder
-
copyBaseFrom
public final 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). If a format was already specified it will remain unchanged, however any other values copied from the given provider config will overwrite the corresponding values of this builder.- Parameters:
providerConfig
- the provider configuration from which to copy the values- Returns:
- this builder
-
setSourceVertexKeyType
public void setSourceVertexKeyType(IdType vertexIdType)
-
setDestinationVertexKeyType
public void setDestinationVertexKeyType(IdType vertexIdType)
-
addVectorProperty
public T addVectorProperty(java.lang.String name, PropertyType type, int dimension, java.lang.Object defaultVal, java.lang.Object column)
Add a property to this builder- Parameters:
name
- the name of the propertytype
- the type of the propertydimension
- the vector dimension of the propertydefaultVal
- the default value of the property (can benull
)column
- the column of the property- Returns:
- this builder
-
addVectorProperty
public T addVectorProperty(java.lang.String name, PropertyType type, int dimension, java.lang.Object defaultVal, java.lang.Object column, java.lang.Object field, java.lang.Object aggregate, java.lang.Object groupKey, java.lang.Object dropAfterLoading)
Add a property to this builder- Parameters:
name
- the name of the propertytype
- the type of the propertydimension
- the vector dimension of the propertydefaultVal
- the default value of the property (can benull
)column
- the column of the propertyfield
- the field of the propertyaggregate
- the aggregate function of the propertygroupKey
- the key for the aggregate of the propertydropAfterLoading
- indicating temporary properties- Returns:
- this builder
-
addStringProperty
public 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- Parameters:
name
- the name of the vertex propertydimension
- the dimension of the vertex propertydefaultVal
- the default value of the vertex property (can benull
)column
- the column of the vertex propertystringPoolingStrategy
- which string pooling strategy to usemaxDistinctStringPerPool
- the amount of distinct strings per property after which to stop pooling- Returns:
- this builder
-
addVectorProperty
public T addVectorProperty(java.lang.String name, PropertyType type, int dimension, java.lang.Object defaultVal)
Add a property to this builder- Parameters:
name
- the name of the propertytype
- the type of the propertydimension
- the vector dimension of the propertydefaultVal
- the default value of the property (can benull
)- Returns:
- this builder
-
addVectorProperty
public T addVectorProperty(java.lang.String name, PropertyType type, int dimension)
Add a property to this builder- Parameters:
name
- the name of the propertytype
- the type of the propertydimension
- the vector dimension of the property- Returns:
- this builder
-
addProperty
public T addProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal, java.lang.Object column)
Add a property to this builder- Parameters:
name
- the name of the propertytype
- the type of the propertydefaultVal
- the default value of the property (can benull
)column
- the column of the property- Returns:
- this builder
-
addStringProperty
public T addStringProperty(java.lang.String name, java.lang.Object defaultVal, StringPoolingStrategy stringPoolingStrategy, java.lang.Integer maxDistinctStringPerPool)
Convenience method foraddStringProperty(String, Object, int, Object, StringPoolingStrategy, Integer)
.- Parameters:
name
- the name of the vertex propertydefaultVal
- the default value of the vertex property (can benull
)stringPoolingStrategy
- which string pooling strategy to usemaxDistinctStringPerPool
- the amount of distinct strings per property after which to stop pooling- Returns:
- this builder
-
addProperty
public T addProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal)
Add a property to this builder- Parameters:
name
- the name of the propertytype
- the type of the propertydefaultVal
- the default value of the property (can benull
)- Returns:
- this builder
-
addProperty
public T addProperty(java.lang.String name, PropertyType type)
Convenience method foraddProperty(String, PropertyType, Object)
.- Parameters:
name
- the name of the propertytype
- the type of the property- Returns:
- this builder
-
removeProperty
public T removeProperty(java.lang.String name)
Removes a property from this builder- Parameters:
name
- the name of the property- Returns:
- this builder
-
clearProperties
public T clearProperties()
Removes all properties from this builder- Returns:
- this builder
-
setLabel
public T setLabel(java.lang.String label)
Sets a custom label for the entities from this providerIf no custom label is specified, the label for the entities from this provider defaults to the provider name
- Parameters:
label
- the custom label- Returns:
- this builder
- See Also:
- "the provider configuration documentation for details about the effects and default of this setting"
-
setName
public T setName(java.lang.String name)
Sets the name of the provider- Parameters:
name
- the name of the provider- Returns:
- this builder
- See Also:
- "the provider configuration documentation for details about the effects and default of this setting"
-
setSourceVertexProvider
public T setSourceVertexProvider(java.lang.String name)
Sets the name of the source vertex provider- Parameters:
name
- the name of the source vertex provider- Returns:
- this builder
- See Also:
- "the provider configuration documentation for details about the effects and default of this setting"
-
setDestinationVertexProvider
public T setDestinationVertexProvider(java.lang.String name)
Sets the name of the destination vertex provider- Parameters:
name
- the name of the destination vertex provider- Returns:
- this builder
- See Also:
- "the provider configuration documentation for details about the effects and default of this setting"
-
setKeyType
public T setKeyType(IdType keyType)
Sets the type of vertex keys- Parameters:
keyType
- the type of vertex keys- Returns:
- this builder
- See Also:
- "the provider configuration documentation for details about the effects and default of this setting"
-
setHasKeys
public T setHasKeys(boolean hasKeys)
Sets the flag indicating if the provider data has keys or not- Parameters:
hasKeys
- flag indicating if the provider data has keys- Returns:
- this builder
- See Also:
- "the provider configuration documentation for details about the effects and default of this setting"
-
addAttribute
public T addAttribute(java.lang.String key, java.lang.String value)
Adds a specific additional attribute to this config- Parameters:
key
- the attribute's keyvalue
- the attribute's value- Returns:
- this builder
-
setPassword
public T setPassword(java.lang.String password)
Sets the password.- Parameters:
password
- the password.- Returns:
- this builder object.
-
setKeystoreAlias
public T setKeystoreAlias(java.lang.String keystoreAlias)
Sets the keystore alias.- Parameters:
keystoreAlias
- the keystore alias.- Returns:
- this builder object.
-
setLocalDateFormat
public T setLocalDateFormat(java.util.List<java.lang.String> localDateFormatList)
Sets the list of local_date formats used for loading and storing the provider.- Parameters:
localDateFormatList
- the list of date formats- Returns:
- this builder
-
setTimeFormat
public T setTimeFormat(java.util.List<java.lang.String> timeFormatList)
Sets the list of time formats used for loading and storing the provider.- Parameters:
timeFormatList
- the list of date formats- Returns:
- this builder
-
setTimestampFormat
public T setTimestampFormat(java.util.List<java.lang.String> timestampFormatList)
Sets the list timestamp formats used for loading and storing the provider.- Parameters:
timestampFormatList
- the list of date formats- Returns:
- this builder
-
setTimeWithTimezoneFormat
public T setTimeWithTimezoneFormat(java.util.List<java.lang.String> timeWithTimezoneFormatList)
Sets the list of time with timezone formats used for loading and storing the provider.- Parameters:
timeWithTimezoneFormatList
- the list of date formats- Returns:
- this builder
-
setTimestampWithTimezoneFormat
public T setTimestampWithTimezoneFormat(java.util.List<java.lang.String> timestampWithTimezoneFormatList)
Sets the list of timestamp with timezone formats used for loading and storing the provider.- Parameters:
timestampWithTimezoneFormatList
- the list of date formats- Returns:
- this builder
-
setStrictMode
public T setStrictMode(boolean strictMode)
Sets the strict mode. See the provider configuration documentation for details about the effects and default of this flag- Parameters:
strictMode
- iftrue
, strict mode is enabled, otherwise strict mode is disabled- Returns:
- this builder
-
createKeyMapping
public T createKeyMapping(boolean flag)
Sets the flag to create the entity key mapping. See the provider configuration documentation for details about the effects and default of this flag- Parameters:
flag
- iftrue
, an entity key mapping is created- Returns:
- this builder
-
enableVertexIdDuplicateCheck
public T enableVertexIdDuplicateCheck(boolean checkVertexIdDuplicates)
Sets whether or not vertex ID duplicates should be checked. See the graph configuration documentation for details about the effects and default of this flag- Parameters:
checkVertexIdDuplicates
- boolean flag for whether or not to enable the check- Returns:
- this builder
-
enableEdgeIdDuplicateCheck
public T enableEdgeIdDuplicateCheck(boolean checkEdgeIdDuplicates)
Sets whether or not edge ID duplicates should be checked. See the graph configuration documentation for details about the effects and default of this flag- Parameters:
checkEdgeIdDuplicates
- boolean flag for whether or not to enable the check- Returns:
- this builder
-
setErrorHandlingOnDuplicateEntityId
public T setErrorHandlingOnDuplicateEntityId(OnMismatch action)
Sets the error handling on duplicated entity ID. See the graph configuration documentation for details about the effects and default of this flag- Parameters:
action
- the action- Returns:
- this builder
-
setErrorHandlingOnMissedPropKey
public T setErrorHandlingOnMissedPropKey(OnMismatch action)
Sets the error handling on missed prop key. See the provider configuration documentation for details about the effects and default of this flag- Parameters:
action
- the action- Returns:
- this builder
-
setErrorHandlingOnPropConversion
public T setErrorHandlingOnPropConversion(OnMismatch action)
Sets the error handling on prop conversion. See the provider configuration documentation for details about the effects and default of this flag- Parameters:
action
- the action- Returns:
- this builder
-
setErrorHandlingOnTypeMismatch
public T setErrorHandlingOnTypeMismatch(OnMismatch action)
Sets the error handling on type mismatch. See the provider configuration documentation for details about the effects and default of this flag- Parameters:
action
- the action- Returns:
- this builder
-
setErrorHandlingOnMissingVertex
public T setErrorHandlingOnMissingVertex(OnMissingVertex action)
Sets the error handling on a missing vertex. See the provider configuration documentation for details about the effects and default of this flag- Parameters:
action
- the action- Returns:
- this builder
-
setErrorHandlingOnVectorLengthMismatch
public T setErrorHandlingOnVectorLengthMismatch(OnMismatch action)
Sets the error handling on vector length mismatch. See the graph configuration documentation for details about the effects and default of this flag- Parameters:
action
- the action- Returns:
- this builder
-
setErrorHandlingOnParsingIssue
public T setErrorHandlingOnParsingIssue(OnMismatch action)
Sets the error handling on a parsing issue. See the graph configuration documentation for details about the effects and default of this flag- Parameters:
action
- the action- Returns:
- this builder
-
redactPassword
public T redactPassword()
-
-