Package com.ibm.fhir.schema.patch
Class Main
- java.lang.Object
-
- com.ibm.fhir.schema.patch.Main
-
public class Main extends java.lang.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 java.lang.String
ADMIN_SCHEMANAME
static java.lang.String
DATA_SCHEMANAME
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperty(java.lang.String pair)
Parse the given key=value string and add to the properties being collectedprotected java.sql.Connection
createConnection()
protected int
getExitStatus()
Get the program exit status from the environmentvoid
loadPropertyFile(java.lang.String filename)
Read the properties from the given fileprotected void
logStatusMessage(int status)
Write a final status message - useful for QA to review when checking the outputstatic void
main(java.lang.String[] args)
Main entry pointprotected void
parseArgs(java.lang.String[] args)
Parse the command-line arguments, building up the environment and establishing the run-listprotected void
patchSchema()
Create the schemasprotected void
process()
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
-
-
-