org.proteios.core
Class Update
java.lang.Object
org.proteios.core.Update
public final class Update
- extends Object
This class contains methods used to update items already in the database.
Based on BASE2 class src/core/net/sf/basedb/core/Update.java,
but adapted to use a main updater class that performs a
general update by calling methods in classes that perform an
incremental update from one version to the next.
- Version:
- 2.0
- Author:
- Olle
- Last modified
- $Date: 2007-02-05 10:14:33Z $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Update
public Update()
main
public static void main(String[] args)
updateDatabase
public static void updateDatabase(ProgressReporter progress,
String rootLogin,
String rootPassword)
throws BaseException
- Update the database by modifying existing items to follow new requirements.
- Parameters:
progress - An object implementing the ProgressReporter
interfacerootLogin - The root user loginrootPassword - The root user password
- Throws:
BaseException
adjustExistingItems
public static void adjustExistingItems(boolean update,
ProgressReporter progress,
String rootLogin,
String rootPassword)
throws BaseException
- Adjust the existing items in the database to be compatible with the latest mappings.
No update to the schema version should be done here. The code must also
consider the case that the update fails at a later stage and that the same
update is executed again.
- Parameters:
update - FALSE if it is an installation. TRUE if it is an update.progress - An object implementing the ProgressReporter
interfacerootLogin - The root user loginrootPassword - The root user password
- Throws:
BaseException