Last update: 2011-06-23

org.proteios.core
Class Update

java.lang.Object
  extended by 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 $

Constructor Summary
Update()
           
 
Method Summary
static void adjustExistingItems(boolean update, ProgressReporter progress, String rootLogin, String rootPassword)
          Adjust the existing items in the database to be compatible with the latest mappings.
static void main(String[] args)
           
static void updateDatabase(ProgressReporter progress, String rootLogin, String rootPassword)
          Update the database by modifying existing items to follow new requirements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Update

public Update()
Method Detail

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 interface
rootLogin - The root user login
rootPassword - 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 interface
rootLogin - The root user login
rootPassword - The root user password
Throws:
BaseException

Last update: 2011-06-23