wt.units
Class UnitsLoader

java.lang.Object
  extended bywt.units.UnitsLoader

public class UnitsLoader
extends Object

Bulk load data (Units) into database for initial setup, Demo Data or migrating from legacy data Called by command line: java wt.units.UnitsLoader


Field Summary
private static String CURRENT_CH_KEY
           
static Installer installService
           
private static String ROOT_NAME
           
private static String SERVICE_NAME
           
private static UnitDBService theUnitDBService
           
private static boolean VERBOSE
           
 
Constructor Summary
UnitsLoader()
           
 
Method Summary
static boolean createMS(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Create Measurement System(s).
static boolean createQOM(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Create Quantity of Measure(s) This method can be called by java wt.load.LoadFromFile -d c:\windchill\loadfiles\quantityofmeasure.csv This method can also be called from the UnitsLoader main program.
static boolean createQOMfromCP(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Create Quantity of Measure.
static void main(String[] args)
          Command line method for loading demonstration data into the Windchill system.
private static boolean updateMeasurementSystem(UnitsService unitServiceHelper, MeasurementSystemDefaultView msdv)
           
private static boolean updateQuantityOfMeasure(UnitsService unitServiceHelper, QuantityOfMeasureDefaultView qomdv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

installService

public static Installer installService

CURRENT_CH_KEY

private static String CURRENT_CH_KEY

theUnitDBService

private static UnitDBService theUnitDBService

VERBOSE

private static final boolean VERBOSE

SERVICE_NAME

private static final String SERVICE_NAME
See Also:
Constant Field Values

ROOT_NAME

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

UnitsLoader

public UnitsLoader()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Command line method for loading demonstration data into the Windchill system.

Parameters:
args - Not used anymore, ignored.
Throws:
Exception

createMS

public static boolean createMS(Hashtable nv,
                               Hashtable cmd_line,
                               Vector return_objects)
Create Measurement System(s). This method can be called by java wt.load.LoadFromFile -d c:\windchill\loadfiles\measurementsystem.csv This method can also be called from the UnitsLoader main program.

Parameters:
cmd_line -
Returns:
boolean for success or failure

createQOM

public static boolean createQOM(Hashtable nv,
                                Hashtable cmd_line,
                                Vector return_objects)
Create Quantity of Measure(s) This method can be called by java wt.load.LoadFromFile -d c:\windchill\loadfiles\quantityofmeasure.csv This method can also be called from the UnitsLoader main program.

Parameters:
cmd_line -
Returns:
boolean for success or failure

createQOMfromCP

public static boolean createQOMfromCP(Hashtable nv,
                                      Hashtable cmd_line,
                                      Vector return_objects)
Create Quantity of Measure. This method is essentially a duplicate of createQOM() for the use of CounterPart. It is needed because the "fastloader" MethodServer code uses the tilde as the separator for all data fields so we cannot use it here for separating the elements in the override list. The only difference from createQOM() is: equalsign (=) is used in place of tilde (~) in tokenizing the ValuePairs.

Parameters:
cmd_line -
Returns:
boolean for success or failure

updateMeasurementSystem

private static boolean updateMeasurementSystem(UnitsService unitServiceHelper,
                                               MeasurementSystemDefaultView msdv)

updateQuantityOfMeasure

private static boolean updateQuantityOfMeasure(UnitsService unitServiceHelper,
                                               QuantityOfMeasureDefaultView qomdv)