Package com.ibm.fhir.schema.patch
Class Main
- java.lang.Object
-
- com.ibm.fhir.schema.patch.Main
-
public class Main extends Object
Utility to patch an old schema for use-cases which fall outside the standard automatic schema migration process
-
-
Field Summary
Fields Modifier and Type Field Description static StringADMIN_SCHEMANAMEstatic StringDATA_SCHEMANAME
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(String pair)Parse the given key=value string and add to the properties being collectedprotected ConnectioncreateConnection()protected intgetExitStatus()Get the program exit status from the environmentvoidloadPropertyFile(String filename)Read the properties from the given fileprotected voidlogStatusMessage(int status)Write a final status message - useful for QA to review when checking the outputstatic voidmain(String[] args)Main entry pointprotected voidparseArgs(String[] args)Parse the command-line arguments, building up the environment and establishing the run-listprotected voidpatchSchema()Create the schemasprotected voidprocess()Process the requested operation
-
-
-
Field Detail
-
ADMIN_SCHEMANAME
public static final String ADMIN_SCHEMANAME
- See Also:
- Constant Field Values
-
DATA_SCHEMANAME
public static final String DATA_SCHEMANAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
createConnection
protected Connection createConnection()
- Returns:
- a created connection to the selected database
-
patchSchema
protected void patchSchema()
Create the schemas
-
parseArgs
protected void parseArgs(String[] args)
Parse the command-line arguments, building up the environment and establishing the run-list- Parameters:
args-
-
loadPropertyFile
public void loadPropertyFile(String filename)
Read the properties from the given file- Parameters:
filename-
-
addProperty
public void addProperty(String pair)
Parse the given key=value string and add to the properties being collected- Parameters:
pair-
-
process
protected void process()
Process the requested operation
-
getExitStatus
protected int getExitStatus()
Get the program exit status from the environment- Returns:
-
logStatusMessage
protected void logStatusMessage(int status)
Write a final status message - useful for QA to review when checking the output
-
main
public static void main(String[] args)
Main entry point- Parameters:
args-
-
-