Package dev.array21.jdbd.drivers
Class PostgreSqlDriverFactory
java.lang.Object
dev.array21.jdbd.drivers.PostgreSqlDriverFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the PostgreSqlDriver.setDatabase(String database) Set the PostgreSQL databaseSet the PostgreSQL hostsetPassword(String password) Set the PostgreSQL passwordsetUsername(String username) Set the PostgreSQL username
-
Constructor Details
-
PostgreSqlDriverFactory
public PostgreSqlDriverFactory()
-
-
Method Details
-
setHost
Set the PostgreSQL host- Parameters:
host- The host to set- Returns:
- The current factory
-
setUsername
Set the PostgreSQL username- Parameters:
username- The username to set- Returns:
- The current factory
-
setPassword
Set the PostgreSQL password- Parameters:
password- The password to set- Returns:
- The current factory
-
setDatabase
Set the PostgreSQL database- Parameters:
database- The database to set- Returns:
- The current factory
-
build
Build the PostgreSqlDriver. Throws an IllegalStateException when:- The host is unsert
- The database is unset
Thread Safety
It is up to the implementer to guarantee that this method is NOT called from two threads simultaneously, this can result in Undefined Behaviour- Returns:
- Return an instance of the PostgreSqlDriver
- Throws:
IOException- When saving the native library failedUnsatisfiedLinkError- When loading the native library failedUnsupportedOperatingSystemException- When the current operating system is unsupported
-