|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.harvester.datamodel.DBConnect
public class DBConnect
Logic to connect with the harvest definition database. This also defines basic logic for checking versions of tables. The statements to create the tables are now in scripts/sql/createfullhddb.sql
Constructor Summary | |
---|---|
DBConnect()
|
Method Summary | |
---|---|
static java.sql.Connection |
getDBConnection()
Get a connection to our database. |
protected static void |
updateTable(java.lang.String table,
int newVersion,
java.lang.String... updates)
Update a table by executing all the statements in the updates String array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBConnect()
Method Detail |
---|
public static java.sql.Connection getDBConnection()
IOFailure
- if we cannot connect to the database (or find the
driver).protected static void updateTable(java.lang.String table, int newVersion, java.lang.String... updates)
table
- The table to updatenewVersion
- The version that the table should end up atupdates
- The SQL update statements that makes the necessary
updates.
IOFailure
- in case of problems in interacting with the database
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |