|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.borg.model.db.jdbc.JdbcDB
public abstract class JdbcDB
abstract base class providing basic common JDBC services to all derived JDBC classes
Field Summary | |
---|---|
protected static Connection |
connection_
|
Constructor Summary | |
---|---|
JdbcDB()
|
Method Summary | |
---|---|
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 |
getOption(String oname)
Gets an option value from the options table |
static Collection<BorgOption> |
getOptions()
Gets all options from the options table. |
static String |
getUrl()
Gets the JDBC url. |
static void |
rollbackTransaction()
rollback a JDBC transaction on the shared connection |
static void |
setOption(BorgOption option)
Sets an option in the options table. |
protected static int |
toInt(boolean in)
|
protected static int |
toInt(Integer in)
|
protected static String |
toStr(Vector<String> v)
|
protected static Vector<String> |
toVect(String s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Connection connection_
Constructor Detail |
---|
public JdbcDB()
Method Detail |
---|
public static String getUrl()
public static void beginTransaction() throws Exception
Exception
public static final void commitTransaction() throws Exception
Exception
public static final void rollbackTransaction() throws Exception
Exception
public static void connect(String urlIn) throws Exception
urlIn
- the JDBC url
Exception
- the exceptionprotected static final String toStr(Vector<String> v)
protected static final int toInt(Integer in)
protected static final int toInt(boolean in)
protected static final Vector<String> toVect(String s)
public static final ResultSet execSQL(String sql) throws Exception
sql
- the sql
Exception
- the exceptionpublic static Connection getConnection()
public static void close() throws Exception
Exception
- the exceptionpublic static final String getOption(String oname) throws Exception
oname
- the option name
Exception
- the exceptionpublic static final Collection<BorgOption> getOptions() throws Exception
Exception
- the exceptionpublic static final void setOption(BorgOption option) throws Exception
option
- the option to set
Exception
- the exceptionpublic static String buildDbDir()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |