java.lang.Object
org.itsallcode.jdbc.ConnectionFactory
This class connects to a database using
DriverManager
and returns new
SimpleConnection
s.
Create a new instance using create()
.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionFactory
create()
Create a new connection factory.Create a connection using the given JDBC URL.Create a connection using the given JDBC URL.create
(String url, Properties info) Create a connection using the given JDBC URL.static ConnectionFactory
Create a new connection factory with a custom context.
-
Method Details
-
create
Create a new connection factory.- Returns:
- a new instance
-
create
Create a new connection factory with a custom context.- Parameters:
context
- a custom context- Returns:
- a new instance
-
create
Create a connection using the given JDBC URL.- Parameters:
url
- JDBC URL- Returns:
- a new connection
-
create
Create a connection using the given JDBC URL.- Parameters:
url
- JDBC URLuser
- database userpassword
- database password- Returns:
- a new connection
-
create
Create a connection using the given JDBC URL.- Parameters:
url
- JDBC URLinfo
- connection properties- Returns:
- a new connection
-