2019-10-03 08:42:09 +02:00
|
|
|
package com.wasteinformationserver.db;
|
2019-09-20 15:02:17 +02:00
|
|
|
|
|
|
|
import java.sql.Connection;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
|
2020-01-23 18:32:29 +01:00
|
|
|
abstract class Database {
|
2019-09-20 15:02:17 +02:00
|
|
|
|
|
|
|
protected String user;
|
|
|
|
protected String password;
|
|
|
|
|
|
|
|
protected String host;
|
|
|
|
protected int port;
|
|
|
|
|
|
|
|
protected String dbName;
|
|
|
|
|
|
|
|
public Database(String user, String password, String host, int port, String dbName) {
|
|
|
|
this.user = user;
|
|
|
|
this.password = password;
|
|
|
|
this.host = host;
|
|
|
|
this.port = port;
|
|
|
|
this.dbName = dbName;
|
|
|
|
}
|
|
|
|
|
2019-10-03 08:42:09 +02:00
|
|
|
public abstract Connection getConnection() throws SQLException;
|
2019-09-20 15:02:17 +02:00
|
|
|
}
|