Class DbConnectionConfig.Builder

java.lang.Object
com.oracle.database.selectai.model.DbConnectionConfig.Builder
Enclosing class:
DbConnectionConfig

public static final class DbConnectionConfig.Builder extends Object
Builder for DbConnectionConfig.
  • Method Details

    • dbUser

      Sets the database username.
      Parameters:
      dbUser - database username
      Returns:
      this builder instance
    • dbPassword

      Sets the database password.
      Parameters:
      dbPassword - database password
      Returns:
      this builder instance
    • walletPassword

      Sets the password for a password-protected wallet.

      The SDK passes this value to Oracle JDBC as oracle.net.wallet_password; it is not appended to the JDBC URL.

      Parameters:
      walletPassword - wallet password, required only for password-protected wallets
      Returns:
      this builder instance
    • jdbcUrl

      Sets an explicit JDBC URL.

      Supported URL forms include Oracle JDBC Thin Easy Connect/Easy Connect Plus, TNS aliases, full connection descriptors, TCPS configurations, and wallet/TNS_ADMIN based Autonomous Database URLs. This builder validates only the SDK-owned minimum contract: the URL must be an Oracle Thin JDBC URL with a non-blank connect target after @. Driver-level network, wallet, TLS, Kerberos, RADIUS, and token-authentication requirements are validated by Oracle JDBC and the database environment.

      Parameters:
      jdbcUrl - full JDBC URL
      Returns:
      this builder instance
    • jdbcProperties

      Sets additional JDBC properties to use when creating the database connection through DriverManager.

      The supplied properties are validated and defensively copied so that subsequent modifications to the caller's Properties instance do not affect this configuration. If jdbcProperties is null, an empty set of JDBC properties is used.

      The SDK owns the user and password properties from dbUser(String) and dbPassword(String). Supplying those keys through this method is rejected. Other driver-specific property names and values are passed through to Oracle JDBC for validation. Do not log properties that contain sensitive values.

      Parameters:
      jdbcProperties - additional JDBC connection properties, or null to use no additional properties
      Returns:
      this builder instance
      Throws:
      IllegalArgumentException - if the supplied properties contain blank property names or SDK-owned user or password keys
    • build

      Validates required connection fields and builds the immutable config.
      Returns:
      immutable DbConnectionConfig built from validated builder state