wt.queue
Class QueueEntryMigrator

java.lang.Object
  extended bywt.queue.QueueEntryMigrator
All Implemented Interfaces:
JavaMigrator

public class QueueEntryMigrator
extends Object
implements JavaMigrator


Field Summary
private static String CLASSNAME
           
private static Connection connection
           
private static boolean DEBUG
           
private  DirectiveServices forLog
           
private static DebugWriter LOG
           
private static PDSIfc pds
           
private static WTConnection wtconnection
           
 
Constructor Summary
QueueEntryMigrator()
           
 
Method Summary
private  String getArgsColumn(BaseTableInfo table_info)
           
 void migrateQueueEntries()
          Convert args from Vector to byte[] containing encoded Vector for all concrete persistable WtQueueEntry's.
private  void migrateQueueEntriesForType(ClassInfo classInfo)
          Convert args from Vector to byte[] containing encoded Vector for a specific class.
 boolean runMigration(DirectiveServices directiveServices)
          Run the migration.
private  void validateArgsColumnIsPresent(String table_name, String blob_column_name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

private static final String CLASSNAME

DEBUG

private static final boolean DEBUG

LOG

private static final DebugWriter LOG

connection

private static Connection connection

wtconnection

private static WTConnection wtconnection

pds

private static PDSIfc pds

forLog

private DirectiveServices forLog
Constructor Detail

QueueEntryMigrator

public QueueEntryMigrator()
Method Detail

runMigration

public boolean runMigration(DirectiveServices directiveServices)
                     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:
directiveServices - provide access to database, logging, and versioning information
Throws:
Exception

migrateQueueEntries

public void migrateQueueEntries()
                         throws WTException,
                                SQLException,
                                IOException,
                                ClassNotFoundException
Convert args from Vector to byte[] containing encoded Vector for all concrete persistable WtQueueEntry's.

Throws:
WTException
SQLException
IOException
ClassNotFoundException

migrateQueueEntriesForType

private void migrateQueueEntriesForType(ClassInfo classInfo)
                                 throws WTException,
                                        SQLException,
                                        IOException,
                                        ClassNotFoundException
Convert args from Vector to byte[] containing encoded Vector for a specific class. If the class is not concrete this method will skip it.

Throws:
WTException
SQLException
IOException
ClassNotFoundException

getArgsColumn

private String getArgsColumn(BaseTableInfo table_info)
                      throws WTException,
                             SQLException
Throws:
WTException
SQLException

validateArgsColumnIsPresent

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