From df7d7981b56a4560c95ea7e9b194080e93398ecf Mon Sep 17 00:00:00 2001 From: Matt Windsor Date: Mon, 21 Mar 2011 21:54:31 +0000 Subject: GREAT PACKAGE RESHUFFLE: Everything is now organised into frontend, backend and common (to frontend and backend) packages. Things may have been broken. Doc refresh. --- .../org/ury/backend/database/DatabaseDriver.html | 317 +++++++++++++++++++++ 1 file changed, 317 insertions(+) create mode 100644 doc/uk/org/ury/backend/database/DatabaseDriver.html (limited to 'doc/uk/org/ury/backend/database/DatabaseDriver.html') diff --git a/doc/uk/org/ury/backend/database/DatabaseDriver.html b/doc/uk/org/ury/backend/database/DatabaseDriver.html new file mode 100644 index 0000000..54611d0 --- /dev/null +++ b/doc/uk/org/ury/backend/database/DatabaseDriver.html @@ -0,0 +1,317 @@ + + + + + + +DatabaseDriver + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +uk.org.ury.backend.database +
+Class DatabaseDriver

+
+java.lang.Object
+  extended by uk.org.ury.backend.database.DatabaseDriver
+
+
+
+
public class DatabaseDriver
extends java.lang.Object
+ + +

+A database connection manager that connects to the URY databases using + suitably privileged accounts, and handles the processing of SQL queries. +

+ +

+

+
Author:
+
Matt Windsor, Nathan Lasseter
+
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
DatabaseDriver(ConfigReader config, + UserClass type) + +
+          Construct a new DatabaseDriver with the given user class.
+  + + + + + + + + + + + + + + + +
+Method Summary
+ java.sql.ResultSetexecuteQuery(java.lang.String sql, + int fetchSize) + +
+          Execute an unprepared SQL statement with no arguments.
+ java.sql.ResultSetexecuteQuery(java.lang.String sql, + java.lang.Object[] params, + int fetchSize) + +
+          Perform a SQL statement with arguments.
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+DatabaseDriver

+
+public DatabaseDriver(ConfigReader config,
+                      UserClass type)
+               throws MissingCredentialsException,
+                      ConnectionFailureException
+
+
Construct a new DatabaseDriver with the given user class. +

+

+
Parameters:
config - The config with login details.
type - The user class to log in to the database with. +
Throws: +
java.lang.IllegalArgumentException - if the user class is not supported (this should not happen). +
MissingCredentialsException - if the user class login credentials could not be loaded. +
ConnectionFailureException - if the database backend failed to connect to the database + server.
+
+ + + + + + + + +
+Method Detail
+ +

+executeQuery

+
+public java.sql.ResultSet executeQuery(java.lang.String sql,
+                                       int fetchSize)
+                                throws java.sql.SQLException
+
+
Execute an unprepared SQL statement with no arguments. +

+

+
Parameters:
sql - The SQL statement to execute.
fetchSize - The maximum number of query rows to return. +
Returns:
the JDBC results set. +
Throws: +
java.sql.SQLException - if a SQL error occurs.
+
+
+
+ +

+executeQuery

+
+public java.sql.ResultSet executeQuery(java.lang.String sql,
+                                       java.lang.Object[] params,
+                                       int fetchSize)
+                                throws java.sql.SQLException
+
+
Perform a SQL statement with arguments. + + This accepts an array of parameter objects, which must each either be + String or Integer objects. The objects will be used sequentially to fill + in '?' placeholders in the query text. +

+

+
Parameters:
sql - The SQL statement to execute.
params - A list of parameter objects.
fetchSize - The maximum number of query rows to return. +
Returns:
the set of results from the query. +
Throws: +
java.lang.IllegalArgumentException - if any of the parameters is unsupported by the database as a + statement parameter. +
java.sql.SQLException - if a SQL error occurs.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.3