wt.workflow.forum
Class MigrateWfEventsR7_R8

java.lang.Object
  extended bywt.workflow.forum.MigrateWfEventsR7_R8
All Implemented Interfaces:
Migrator

public class MigrateWfEventsR7_R8
extends Object
implements Migrator

MigrateWfEventsR7_R8 migrates workflow event tables from 7.0 to 8.0 (x05). This "migration" consists simply on emptying some event tables, as these tables are not supposed to be used. The tables are the following:


Field Summary
private  Connection conn
           
private  PrintWriter debugLog
           
private static String[] eventTables
           
private  PersistentObjectManager pom
           
private static boolean VERBOSE
           
 
Constructor Summary
MigrateWfEventsR7_R8()
           
 
Method Summary
private  void emptyEventTables()
           
private  void emptyTable(String table_name)
           
 boolean runMigration(Connection conn, 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

VERBOSE

private static final boolean VERBOSE
See Also:
Constant Field Values

debugLog

private PrintWriter debugLog

conn

private Connection conn

pom

private PersistentObjectManager pom

eventTables

private static final String[] eventTables
Constructor Detail

MigrateWfEventsR7_R8

public MigrateWfEventsR7_R8()
Method Detail

runMigration

public boolean runMigration(Connection conn,
                            PersistentObjectManager pom,
                            PrintWriter logWriter)
                     throws SQLException,
                            WTException,
                            IOException
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:
conn - 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
WTException
IOException

emptyEventTables

private void emptyEventTables()
                       throws WTException
Throws:
WTException

emptyTable

private void emptyTable(String table_name)
                 throws SQLException,
                        WTException
Throws:
SQLException
WTException