public final class DatabaseAdaptorPostgresql implements DatabaseAdaptor{
-// private static String url = "jdbc:postgresql://localhost:5432/mir";
-// just testing
-
- private static String url = "jdbc:postgresql://localhost:5432/mir_unstable";
- private static String driver = "org.postgresql.Driver";
-
public String getDriver() {
- return driver;
+ return MirConfig.getProp("Adaptor.PostgreSQL.Driver");
}
public String getURL(String user, String pass, String host) {
- return url;
- }
-
- public static void setUrl(String u) throws Exception {
- if (!url.startsWith("jdbc:"))
- throw new Exception("Database Adaptor URL must begin with: \"jdbc:\"");
- url = u;
- }
-
- public static void setDriver(String d) {
- driver = d;
+ return MirConfig.getProp("Adaptor.PostgreSQL.URL");
}
public boolean hasLimit() {