Class AbstractEntityProviderConfigBuilder<T extends AbstractEntityProviderConfigBuilder<T,​GTC>,​GTC extends EntityProviderConfig>

  • 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 Detail

      • AbstractEntityProviderConfigBuilder

        public AbstractEntityProviderConfigBuilder()
        default constructor
    • 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 property
        type - the type of the property
        dimension - the vector dimension of the property
        defaultVal - the default value of the property (can be null)
        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 property
        type - the type of the property
        dimension - the vector dimension of the property
        defaultVal - the default value of the property (can be null)
        column - the column of the property
        field - the field of the property
        aggregate - the aggregate function of the property
        groupKey - the key for the aggregate of the property
        dropAfterLoading - 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 property
        dimension - the dimension of the vertex property
        defaultVal - the default value of the vertex property (can be null)
        column - the column of the vertex property
        stringPoolingStrategy - which string pooling strategy to use
        maxDistinctStringPerPool - 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 property
        type - the type of the property
        dimension - the vector dimension of the property
        defaultVal - the default value of the property (can be null)
        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 property
        type - the type of the property
        dimension - 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 property
        type - the type of the property
        defaultVal - the default value of the property (can be null)
        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)
        Parameters:
        name - the name of the vertex property
        defaultVal - the default value of the vertex property (can be null)
        stringPoolingStrategy - which string pooling strategy to use
        maxDistinctStringPerPool - 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 property
        type - the type of the property
        defaultVal - the default value of the property (can be null)
        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 provider

        If 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 key
        value - 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 - if true, 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 - if true, 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()