FileDocCategorySizeDatePackage
MigrateMain.javaAPI DocExample1361Thu Oct 13 12:07:18 BST 2005com.samscdrental.migration

MigrateMain

public class MigrateMain extends Object

Fields Summary
private static String
CDRELEASE_FILENAME
private static String
CDDISC_FILENAME
private static String
CUSTOMER_FILENAME
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

		setupFilenames( args );
		try
		{
			StoreDataAccess aStoreDataAccess = StoreDataAccess.makeNew();
			MaintenanceOperations aMaintenanceOperations =
				MaintenanceOperations.getInstance();
			aMaintenanceOperations.collectionsInitialize(
				CUSTOMER_FILENAME,
				CDDISC_FILENAME,
				CDRELEASE_FILENAME );

			aStoreDataAccess.dispose();
		}
		catch ( ImportFileDeviation e )
		{
			System.out.println( e.getMessage() );
		}
		catch ( ImportFormatDeviation e )
		{
			System.out.println( e.getMessage() );
		}
	
private static voidsetupFilenames(java.lang.String[] args)

		if ( args.length == 0 )
		{
			return;
		}
		if ( args.length < 3 )
		{
			System.out.println( "You must specify 3 filenames" +
								"- CDRelease, CDDisc, Customer" );
			return;
		}
		CDRELEASE_FILENAME = args[0];
		CDDISC_FILENAME = args[1];
		CUSTOMER_FILENAME = args[2];