|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.borg.model.db.jdbc.JdbcDBUpgrader
class JdbcDBUpgrader
Class JdbcDBUpgrader is used to upgrade HSQL database in-place when the schema changes for a release. This class will check an update condition, and if true, execute SQL to upgrade the DB. It is meant to be called during model initialization - preferably from the constructors of the JdbcDB classes
| Constructor Summary | |
|---|---|
JdbcDBUpgrader(String checkSql,
String usql)
Instantiates a new jdbc db upgrader. |
|
JdbcDBUpgrader(String checkSql,
String[] usql)
Instantiates a new jdbc db upgrader. |
|
| Method Summary | |
|---|---|
void |
upgrade()
run the upgrade check and then upgrade if needed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JdbcDBUpgrader(String checkSql,
String usql)
checkSql - the sql that checks if an upgrade is neededusql - the sql to upgrade the db if needed
public JdbcDBUpgrader(String checkSql,
String[] usql)
checkSql - the sql that checks if an upgrade is neededusql - an array of SQL statements to execute to perform the upgrade| Method Detail |
|---|
public void upgrade()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||