org.glite.security.voms.database.connection
Class DatabaseUpgrade

java.lang.Object
  extended byorg.glite.security.voms.database.connection.DatabaseUpgrade

public final class DatabaseUpgrade
extends java.lang.Object

A class for fixing errors in the database introduced by previous version of voms-admin. It is a special class in that it has its own database connection management, because it needs a raw general update connection.


Constructor Summary
DatabaseUpgrade()
           
 
Method Summary
static void checkDatabaseVersion(java.sql.Connection c)
          Set database version number.
static void convertRequestsToBlobs(java.sql.Connection c)
          Convert Oracle LONG RAW REQUESTS.REQUEST data created in 1.2.7 and below to BLOBs.
static void fixPrimaryKeys(java.sql.Connection c)
           
static void upgrade()
          Upgrade the database from a previous version on the fly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseUpgrade

public DatabaseUpgrade()
Method Detail

convertRequestsToBlobs

public static void convertRequestsToBlobs(java.sql.Connection c)
                                   throws java.sql.SQLException,
                                          VOMSException
Convert Oracle LONG RAW REQUESTS.REQUEST data created in 1.2.7 and below to BLOBs. (Added in version 1.2.8.)

Throws:
java.sql.SQLException
VOMSException

fixPrimaryKeys

public static void fixPrimaryKeys(java.sql.Connection c)
                           throws java.sql.SQLException,
                                  VOMSException
Throws:
java.sql.SQLException
VOMSException

checkDatabaseVersion

public static void checkDatabaseVersion(java.sql.Connection c)
                                 throws java.sql.SQLException,
                                        VOMSException
Set database version number.

Throws:
java.sql.SQLException
VOMSException

upgrade

public static void upgrade()
Upgrade the database from a previous version on the fly.