Class DbConnectionConfig
Use this configuration with SelectAI.create(DbConnectionConfig)
or DatabaseAdmin.create(DbConnectionConfig) when the
SDK should open and own one JDBC connection. For pooled or multi-threaded
applications, prefer the DataSource-based factory methods.
Password fields are retained in memory as String values so they can
be passed to Oracle JDBC. Do not log, persist, or expose this configuration
in diagnostics.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic DbConnectionConfig.Builderbuilder()Creates a builder for database connection configuration.Returns the database password.Returns the database username.Returns additional JDBC connection properties.Returns the JDBC URL.Returns the password for a password-protected wallet.
-
Method Details
-
getDbUser
Returns the database username.- Returns:
- configured database username
-
getDbPassword
Returns the database password.This value is sensitive. Do not log, persist, or expose it in diagnostics.
- Returns:
- configured database password
-
getWalletPassword
Returns the password for a password-protected wallet.This value is sensitive. Do not log, persist, or expose it in diagnostics.
- Returns:
- configured wallet password, or
nullwhen the wallet is not password-protected
-
getJdbcUrl
Returns the JDBC URL.- Returns:
- configured JDBC URL
-
getJdbcProperties
Returns additional JDBC connection properties.The returned
Propertiesobject is a defensive copy. Changes to it do not affect this connection configuration. Property values may contain sensitive data, so callers should not log or expose the returned object.- Returns:
- configured JDBC properties; never
null
-
builder
Creates a builder for database connection configuration.The builder does not provide default credentials, wallet locations, or database names. Callers must supply connection values explicitly.
- Returns:
- new builder with no connection values populated
-