Class DatabaseCredentials.DatabaseCredentialsBuilder
java.lang.Object
net.blockhost.commons.database.core.DatabaseCredentials.DatabaseCredentialsBuilder
- Enclosing class:
DatabaseCredentials
Custom builder with validation.
-
Method Summary
Modifier and TypeMethodDescription@NonNull DatabaseCredentialsbuild()connectionTimeout(Duration timeout) Sets the connection timeout duration.connectionTimeoutSeconds(int seconds) Sets the connection timeout in seconds.driverClassName(String driverClassName) Sets the JDBC driver class name.Sets the JDBC URL for the database connection.Sets the password for authentication.properties(@NonNull Map<? extends String, ? extends String> properties) @NonNull StringtoString()Sets the username for authentication.
-
Method Details
-
jdbcUrl
Sets the JDBC URL for the database connection. -
driverClassName
Sets the JDBC driver class name. -
username
Sets the username for authentication. -
password
Sets the password for authentication. -
connectionTimeout
Sets the connection timeout duration. -
connectionTimeoutSeconds
Sets the connection timeout in seconds. -
property
public @NonNull DatabaseCredentials.DatabaseCredentialsBuilder property(String propertyKey, String propertyValue) -
properties
public @NonNull DatabaseCredentials.DatabaseCredentialsBuilder properties(@NonNull Map<? extends String, ? extends String> properties) -
clearProperties
-
build
-
toString
-