final class JdbcDB extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Connection |
connection_ |
| Constructor and Description |
|---|
JdbcDB() |
| Modifier and Type | Method and Description |
|---|---|
static void |
beginTransaction()
begin a JDBC transaction on the shared connection
|
static String |
buildDbDir()
Builds the db url from the user's settings.
|
static void |
close()
Close the open connection and shutdown the db (if HSQL)
|
static void |
commitTransaction()
commit a JDBC transaction on the shared connection
|
static void |
connect(String urlIn)
Connect to the database.
|
static ResultSet |
execSQL(String sql)
Execute arbitrary SQL against the open JDBC connection
|
static Connection |
getConnection()
Gets the connection.
|
static String |
getUrl()
Gets the JDBC url.
|
static void |
rollbackTransaction()
rollback a JDBC transaction on the shared connection
|
static int |
toInt(boolean in) |
static int |
toInt(Integer in) |
static String |
toStr(Vector<String> v) |
static Vector<String> |
toVect(String s) |
protected static Connection connection_
public static String getUrl()
public static void beginTransaction()
throws Exception
Exceptionpublic static final void commitTransaction()
throws Exception
Exceptionpublic static final void rollbackTransaction()
throws Exception
Exceptionpublic static void connect(String urlIn) throws Exception
urlIn - the JDBC urlException - the exceptionpublic static final int toInt(Integer in)
public static final int toInt(boolean in)
public static final ResultSet execSQL(String sql) throws Exception
sql - the sqlException - the exceptionpublic static Connection getConnection()
public static void close()
throws Exception
Exception - the exceptionpublic static String buildDbDir()
Generated March 24 2013 by mike using Apache Ant(TM) version 1.8.2 compiled on May 18 2012 and Java version 1.7.0_15 from Oracle Corporation on Linux i386 3.5.0-26-generic