/** filename: DataBaseParam.java */
package historyPlaces;
public class DataBaseParam
{
/** This is the name of the JDBC driver for using postgresql
* Note: The driver should be located in this directory:
* WEB-INF/lib
*/
private static final String cDRIVER_STRING = "org.postgresql.Driver";
/**
* This is the location/URL of the database.
*/
private static final String cDB_URL_STRING = "jdbc:postgresql://localhost/hp";
/**
* To make the connection a UserID and password are required
*/
private static final String cUserID = "dthtran";
private static final String cUserPassword = "dthtran";
public static final String getDriver() { return cDRIVER_STRING; }
public static final String getDbURL() { return cDB_URL_STRING; }
public static final String getUserID() { return cUserID; }
public static final String getUserPassword() { return cUserPassword; }
/* Returns information about the database connection */
public static final String getConnInfo()
{
String t = "";
t += "Driver: |" + cDRIVER_STRING + "|
";
t += "DB URL: |" + cDB_URL_STRING + "|
";
t += "UserID: |" + cUserID + "|
";
t += "Password: |" + cUserPassword + "|
";
return t;
}
}