wt.folder
Class CabinetKeyMigration

java.lang.Object
  extended bywt.folder.CabinetKeyMigration
All Implemented Interfaces:
Migrator

public class CabinetKeyMigration
extends Object
implements Migrator

wt.folder.CabinetKeyMigrate: Populates the CabinetKey table when migrating from R5.0 or R5.1 to R6.0.


Field Summary
private static boolean DEBUG_TEST
           
private static PrintWriter debugLog
           
 
Constructor Summary
CabinetKeyMigration()
           
 
Method Summary
 boolean migrateCabinetKeys(Connection connection)
           
 boolean runMigration(Connection connection, PersistentObjectManager pom, PrintWriter logWriter)
          Run the migration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_TEST

private static boolean DEBUG_TEST

debugLog

private static PrintWriter debugLog
Constructor Detail

CabinetKeyMigration

public CabinetKeyMigration()
Method Detail

migrateCabinetKeys

public boolean migrateCabinetKeys(Connection connection)
                           throws SQLException,
                                  WTIntrospectionException,
                                  DatastoreException,
                                  IOException,
                                  ClassNotFoundException,
                                  WTException
Throws:
SQLException
WTIntrospectionException
DatastoreException
IOException
ClassNotFoundException
WTException

runMigration

public boolean runMigration(Connection connection,
                            PersistentObjectManager pom,
                            PrintWriter logWriter)
                     throws SQLException,
                            WTIntrospectionException,
                            DatastoreException,
                            IOException,
                            ClassNotFoundException,
                            WTException
Description copied from interface: Migrator
Run the migration.

Migrators should log all output to the given PrintWriter. This is the log that is created by RunMigrators. It is an autoflush writer.

Migrators should return true if they successfully completed migration and false otherwise. It is the migrator's responsibility to log failure reasons to the log.

Migrators should not concern themselves with committing the work on the connection. The MigratorRunner will commit the connection work after running each Migrator.

Specified by:
runMigration in interface Migrator
Parameters:
connection - an open connection to the Windchill database
pom - a persistent object manager against the Windchill database
logWriter - an autoflush printwriter for logging any and all output
Throws:
SQLException
WTIntrospectionException
DatastoreException
IOException
ClassNotFoundException
WTException