wt.fc
Class RequiredBlobMigrator

java.lang.Object
  extended bywt.fc.RequiredBlobMigrator
All Implemented Interfaces:
JavaMigrator

public class RequiredBlobMigrator
extends Object
implements JavaMigrator

This class implements a migrator to check Required BLOB columns to ensure that the column does not contain a valid BLOB with zero length.


Field Summary
private static String JDBC_DRIVER
           
private static String JDBC_URL_PREFIX
           
private static boolean VERBOSE
           
 
Constructor Summary
RequiredBlobMigrator()
           
 
Method Summary
private static long getEmptyBlobCount(ClassInfo a_classInfo, Connection a_connection)
           
static void main(String[] args)
           
private static void processPersistables(Connection a_connection)
           
 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

VERBOSE

private static boolean VERBOSE

JDBC_DRIVER

private static final String JDBC_DRIVER
See Also:
Constant Field Values

JDBC_URL_PREFIX

private static final String JDBC_URL_PREFIX
See Also:
Constant Field Values
Constructor Detail

RequiredBlobMigrator

public RequiredBlobMigrator()
Method Detail

runMigration

public boolean runMigration(DirectiveServices directive_services)
                     throws Throwable
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:
Throwable - declared so that migrators can let exceptions contibuting to failure pass out of the method. The migrator runner will handle these by logging them.

main

public static void main(String[] args)

processPersistables

private static void processPersistables(Connection a_connection)
                                 throws WTException,
                                        SQLException,
                                        IOException
Throws:
WTException
SQLException
IOException

getEmptyBlobCount

private static long getEmptyBlobCount(ClassInfo a_classInfo,
                                      Connection a_connection)
                               throws WTException,
                                      SQLException
Throws:
WTException
SQLException