summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/imagemaster/db/MySQL.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/db/MySQL.java')
-rw-r--r--src/main/java/org/openslx/imagemaster/db/MySQL.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/org/openslx/imagemaster/db/MySQL.java b/src/main/java/org/openslx/imagemaster/db/MySQL.java
index ebc44c7..121ef1b 100644
--- a/src/main/java/org/openslx/imagemaster/db/MySQL.java
+++ b/src/main/java/org/openslx/imagemaster/db/MySQL.java
@@ -25,7 +25,7 @@ class MySQL
/**
* Static initializer for setting up the database connection.
- * This gets called implicitly as soon as the clas loader loads
+ * This gets called implicitly as soon as the class loader loads
* the class. In most cases that happens when the class is being
* accessed for the first time during run time.
*/
@@ -52,7 +52,7 @@ class MySQL
final String dbname = properties.getProperty( "db" );
final String user = properties.getProperty( "user" );
final String password = properties.getProperty( "password" );
-
+
Util.notNullFatal( host, "host not set in mysql properties" );
Util.notNullFatal( dbname, "db not set in mysql properties" );
Util.notNullFatal( user, "user not set in mysql properties" );
@@ -77,7 +77,7 @@ class MySQL
* Get a list of objects of the given class from the database.
* The class needs a matching constructor for the query you pass in, i.e. number of
* arguments has to be equal to number of columns returned by query.
- *
+ *
* @param clazz The class to instanciate for the result(s)
* @param sql The sql query to run
* @param args Any number of arguments to the query (using the '?' placeholder)
@@ -92,7 +92,7 @@ class MySQL
* Run a query on the database that will return at most one result.
* If the query returns a row, it will be used to instanciate the given class. If
* it doesn't return a row, null will be returned.
- *
+ *
* @param clazz The class to instanciate for the result (if any)
* @param sql The sql query to run
* @param args Any number of arguments to the query (using the '?' placeholder)
@@ -102,16 +102,16 @@ class MySQL
{
return db.findUniqueOrNull( clazz, sql, args );
}
-
+
/**
* Run an update on the database, return number of rows affected.
- *
+ *
* @param sql The update/insert query to run
* @param args Any number of arguments to the query (using the '?' placeholder)
* @return Number of rows affected by query
*/
- protected static int update( String sql, Object... args) {
+ protected static int update( String sql, Object... args )
+ {
return db.update( sql, args );
}
}
-