Package edu.suffolk.litlab.efspserver.db
Class DatabaseCreator
java.lang.Object
edu.suffolk.litlab.efspserver.db.DatabaseCreator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DataSource
makeDataSource
(String pgUrl, int pgPort, String pgDb, String pgUser, String pgPassword, int maxConnections, int waitForConnMillis) static DataSource
makeDataSource
(String pgFullUrl, String pgDb, String pgUser, String pgPassword, int maxConnections, int waitForConnMillis) Of the full jdbc form, with no db name: e.g.static Connection
makeSingleConnection
(String pgDb, String pgFullUrl, String pgUser, String pgPassword)
-
Constructor Details
-
DatabaseCreator
public DatabaseCreator()
-
-
Method Details
-
makeDataSource
public static DataSource makeDataSource(String pgUrl, int pgPort, String pgDb, String pgUser, String pgPassword, int maxConnections, int waitForConnMillis) throws ClassNotFoundException, SQLException - Parameters:
pgUser
- The user of the PostgreSQL databasepgPassword
- The password for the above user- Throws:
ClassNotFoundException
SQLException
-
makeDataSource
public static DataSource makeDataSource(String pgFullUrl, String pgDb, String pgUser, String pgPassword, int maxConnections, int waitForConnMillis) throws ClassNotFoundException, SQLException Of the full jdbc form, with no db name: e.g. "jdcb:postgresql://localhost:9000"- Throws:
ClassNotFoundException
SQLException
-
makeSingleConnection
public static Connection makeSingleConnection(String pgDb, String pgFullUrl, String pgUser, String pgPassword) throws SQLException - Throws:
SQLException
-