wt.workflow.notebook
Class MigrateContainerRefR7_R8

java.lang.Object
  extended bywt.workflow.notebook.MigrateContainerRefR7_R8
All Implemented Interfaces:
Migrator

public class MigrateContainerRefR7_R8
extends Object
implements Migrator


Field Summary
(package private) static Connection connection
           
(package private) static PrintWriter debugLog
           
(package private) static boolean VERBOSE
           
 
Constructor Summary
MigrateContainerRefR7_R8()
           
 
Method Summary
private  long getNotebookId(long nbfId)
           
private  void migrateForumBookmarks()
           
private  void migrateForumPostings()
           
private  void migrateForums()
           
private  void migrateForumTopics()
           
private  void migrateNonUserNotebooks()
           
private  void migrateNotebookBookmarks()
           
private  void migrateNotebookFolders()
           
private  void migrateUserNotebooks()
           
 boolean runMigration(Connection conn, PersistentObjectManager pom_, PrintWriter logWriter)
          Run the migration.
private  void update(String sql)
           
private  void updateBookmark(long bookmarkId, long notebookId, long nbfId, String tableName)
           
private  void updateForumBookmark(long bookmarkId, String tableName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

static boolean VERBOSE

debugLog

static PrintWriter debugLog

connection

static Connection connection
Constructor Detail

MigrateContainerRefR7_R8

public MigrateContainerRefR7_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

migrateUserNotebooks

private void migrateUserNotebooks()
                           throws WTException,
                                  SQLException
Throws:
WTException
SQLException

migrateNonUserNotebooks

private void migrateNonUserNotebooks()
                              throws WTException,
                                     SQLException
Throws:
WTException
SQLException

migrateNotebookFolders

private void migrateNotebookFolders()
                             throws WTException,
                                    SQLException
Throws:
WTException
SQLException

migrateNotebookBookmarks

private void migrateNotebookBookmarks()
                               throws WTException,
                                      SQLException
Throws:
WTException
SQLException

migrateForums

private void migrateForums()
                    throws WTException,
                           SQLException
Throws:
WTException
SQLException

migrateForumTopics

private void migrateForumTopics()
                         throws WTException,
                                SQLException
Throws:
WTException
SQLException

migrateForumPostings

private void migrateForumPostings()
                           throws WTException,
                                  SQLException
Throws:
WTException
SQLException

migrateForumBookmarks

private void migrateForumBookmarks()
                            throws WTException,
                                   SQLException
Throws:
WTException
SQLException

update

private void update(String sql)
             throws WTException,
                    SQLException
Throws:
WTException
SQLException

getNotebookId

private long getNotebookId(long nbfId)
                    throws WTException,
                           SQLException
Throws:
WTException
SQLException

updateBookmark

private void updateBookmark(long bookmarkId,
                            long notebookId,
                            long nbfId,
                            String tableName)
                     throws WTException,
                            SQLException
Throws:
WTException
SQLException

updateForumBookmark

private void updateForumBookmark(long bookmarkId,
                                 String tableName)
                          throws WTException,
                                 SQLException
Throws:
WTException
SQLException