aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/uk/org/ury/database')
-rw-r--r--src/uk/org/ury/database/DatabaseDriver.java11
-rw-r--r--src/uk/org/ury/database/UserClass.java20
2 files changed, 21 insertions, 10 deletions
diff --git a/src/uk/org/ury/database/DatabaseDriver.java b/src/uk/org/ury/database/DatabaseDriver.java
index ca7a928..a7db32e 100644
--- a/src/uk/org/ury/database/DatabaseDriver.java
+++ b/src/uk/org/ury/database/DatabaseDriver.java
@@ -51,14 +51,9 @@ public class DatabaseDriver
public
DatabaseDriver (ConfigReader config, UserClass type) throws MissingCredentialsException, ConnectionFailureException
{
-
try
{
- System.out.println ("Trying to acquire connection...");
-
- connect(config, type);
-
- System.out.println ("...connection succeeded.");
+ connect (config, type);
}
catch (SQLException e)
{
@@ -72,9 +67,9 @@ public class DatabaseDriver
* Connect to the URY database.
*
* @param config The config to use for the connection.
- * @param type The access level of the connection
+ * @param type The access level of the connection
*
- * @throws SQLException if the database connection failed.
+ * @throws SQLException if the database connection failed.
*/
private void
diff --git a/src/uk/org/ury/database/UserClass.java b/src/uk/org/ury/database/UserClass.java
index 8f30952..79af61a 100644
--- a/src/uk/org/ury/database/UserClass.java
+++ b/src/uk/org/ury/database/UserClass.java
@@ -19,6 +19,22 @@ package uk.org.ury.database;
public enum UserClass
{
- READ_ONLY,
- READ_WRITE
+ // Constant configName
+ READ_ONLY ("read_only"),
+ READ_WRITE ("read_write");
+
+
+ /**
+ * The name of the tag in the configuration file that contains
+ * the credentials for this user class.
+ */
+
+ public String configName;
+
+
+ private
+ UserClass (String configName)
+ {
+ this.configName = configName;
+ }
}