Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.borg.model.db.jdbc
Class JdbcDBUpgrader

    java.lang.Object
      net.sf.borg.model.db.jdbc.JdbcDBUpgrader

     class JdbcDBUpgrader

extends Object

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

### JdbcDBUpgrader

    public JdbcDBUpgrader(String checkSql,
                          String usql)

  Instantiates a new jdbc db upgrader.

  Parameters:
    `checkSql` - the sql that checks if an upgrade is needed
    `usql` - the sql to upgrade the db if needed

### JdbcDBUpgrader

    public JdbcDBUpgrader(String checkSql,
                          String[] usql)

  Instantiates a new jdbc db upgrader.

  Parameters:
    `checkSql` - the sql that checks if an upgrade is needed
    `usql` - an array of SQL statements to execute to perform the upgrade

Method Detail

### upgrade

    public void upgrade()

  run the upgrade check and then upgrade if needed

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Generated September 24 2010 by mbb using Apache Ant version 1.7.1 compiled on June 27 2008 and Java version 1.6.0_20 from Sun Microsystems Inc. on Linux i386 2.6.24-28-generic