wt.replication
Class StreamedMigrationForUfid

java.lang.Object
  extended bywt.replication.StreamedMigrationForUfid
All Implemented Interfaces:
Migrator

public class StreamedMigrationForUfid
extends Object
implements Migrator


Constructor Summary
StreamedMigrationForUfid()
           
 
Method Summary
private  void doMigration(Connection connection, PersistentObjectManager pom, PrintWriter logWriter, Class targetClass)
           
private  QueryResult findKnownRepository(Repository repos, PersistentObjectManager pom)
           
private  StreamIdentity findStreamIdentity(long streamId, PersistentObjectManager pom)
           
private  QueryResult getCorrespondingObject(Ufid ufid, PersistentObjectManager pom)
           
private  Repository getRepository(String guid, PersistentObjectManager pom)
           
private  Ufid getUfid(Persistable object, PersistentObjectManager pom, PrintWriter logWriter)
           
 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
 

Constructor Detail

StreamedMigrationForUfid

public StreamedMigrationForUfid()
Method Detail

runMigration

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

doMigration

private void doMigration(Connection connection,
                         PersistentObjectManager pom,
                         PrintWriter logWriter,
                         Class targetClass)
                  throws SQLException,
                         WTPropertyVetoException,
                         WTException
Throws:
SQLException
WTPropertyVetoException
WTException

getUfid

private Ufid getUfid(Persistable object,
                     PersistentObjectManager pom,
                     PrintWriter logWriter)
              throws WTException,
                     WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

findStreamIdentity

private StreamIdentity findStreamIdentity(long streamId,
                                          PersistentObjectManager pom)
                                   throws WTException
Throws:
WTException

findKnownRepository

private QueryResult findKnownRepository(Repository repos,
                                        PersistentObjectManager pom)
                                 throws WTException
Throws:
WTException

getCorrespondingObject

private QueryResult getCorrespondingObject(Ufid ufid,
                                           PersistentObjectManager pom)
                                    throws WTException,
                                           WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getRepository

private Repository getRepository(String guid,
                                 PersistentObjectManager pom)
                          throws WTException
Throws:
WTException