Package com.ibm.fhir.schema.patch
Class Main
- java.lang.Object
-
- com.ibm.fhir.schema.patch.Main
-
public class Main extends java.lang.ObjectUtility 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 java.lang.StringADMIN_SCHEMANAMEstatic java.lang.StringDATA_SCHEMANAME
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(java.lang.String pair)Parse the given key=value string and add to the properties being collectedprotected java.sql.ConnectioncreateConnection()protected intgetExitStatus()Get the program exit status from the environmentvoidloadPropertyFile(java.lang.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(java.lang.String[] args)Main entry pointprotected voidparseArgs(java.lang.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 java.lang.String ADMIN_SCHEMANAME
- See Also:
- Constant Field Values
-
DATA_SCHEMANAME
public static final java.lang.String DATA_SCHEMANAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
createConnection
protected java.sql.Connection createConnection()
- Returns:
- a created connection to the selected database
-
patchSchema
protected void patchSchema()
Create the schemas
-
parseArgs
protected void parseArgs(java.lang.String[] args)
Parse the command-line arguments, building up the environment and establishing the run-list- Parameters:
args-
-
loadPropertyFile
public void loadPropertyFile(java.lang.String filename)
Read the properties from the given file- Parameters:
filename-
-
addProperty
public void addProperty(java.lang.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(java.lang.String[] args)
Main entry point- Parameters:
args-
-
-