wt.inf.container
Class PJL_PDML_SystemCabinetMigrator

java.lang.Object
  extended bywt.inf.container.PJL_PDML_SystemCabinetMigrator
All Implemented Interfaces:
JavaMigrator

public class PJL_PDML_SystemCabinetMigrator
extends Object
implements JavaMigrator

Assigns objects in the exchange container's system cabinet to the exchange container


Field Summary
(package private)  DirectiveServices ds
           
(package private)  long exchangeOid
           
(package private)  long systemCabinetOid
           
 
Constructor Summary
PJL_PDML_SystemCabinetMigrator()
           
 
Method Summary
private  String[] getFolderedAndContainedTables()
          Get the tables of all concrete objects that are both Foldered and WTContained
private  void initOids()
          Finds the oid of the exchange container and the exchange container's system cabinet
 boolean runMigration(DirectiveServices directive_services)
          Run the migration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ds

DirectiveServices ds

exchangeOid

long exchangeOid

systemCabinetOid

long systemCabinetOid
Constructor Detail

PJL_PDML_SystemCabinetMigrator

public PJL_PDML_SystemCabinetMigrator()
Method Detail

runMigration

public boolean runMigration(DirectiveServices directive_services)
                     throws Exception
Description copied from interface: JavaMigrator
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 JavaMigrator
Parameters:
directive_services - provide access to database, logging, and versioning information
Throws:
Exception

initOids

private void initOids()
               throws Exception
Finds the oid of the exchange container and the exchange container's system cabinet

Throws:
WTException - If the exchange container can't be found, if there is more than one row in the exchange container table, or if the exchange container doesn't have a system cabinet ref
Exception

getFolderedAndContainedTables

private String[] getFolderedAndContainedTables()
                                        throws Exception
Get the tables of all concrete objects that are both Foldered and WTContained

Returns:
An array of table names
Throws:
Exception