Class DerbyBootstrapper
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.util.DerbyBootstrapper
-
public class DerbyBootstrapper extends Object
This class contains bootstrapping code for the Derby Database.
-
-
Constructor Summary
Constructors Constructor Description DerbyBootstrapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
bootstrap(Connection connection, String adminSchemaName, String dataSchemaName)
Bootstrap the (derby) connection with all the DML we need for an operational FHIR schema Should be idempotent, because we use a version_history table to track which DML statements have been applied, and which are still requiredstatic void
bootstrapBatchDb(DataSource ds)
bootstraps the batch database for derby.static void
bootstrapDb(DataSource fhirDb)
Bootstraps the FHIR database (only for Derby databases) Note: Since v4.0.0, the schema is generated and applied using fhir-persistence-schema, not liquibasestatic void
bootstrapOauthDb(DataSource ds)
Bootstraps the Liberty OAuth 2.0 tables for supporting management of OAuth 2.0 Clientsstatic void
populateResourceTypeAndParameterNameTableEntries(Connection connection, String adminSchemaName, String dataSchemaName)
prepopulates the bootstrapped derby database with static lookup data.
-
-
-
Method Detail
-
bootstrapDb
public static void bootstrapDb(DataSource fhirDb) throws SQLException
Bootstraps the FHIR database (only for Derby databases) Note: Since v4.0.0, the schema is generated and applied using fhir-persistence-schema, not liquibase- Throws:
SQLException
-
bootstrap
public static void bootstrap(Connection connection, String adminSchemaName, String dataSchemaName) throws SQLException
Bootstrap the (derby) connection with all the DML we need for an operational FHIR schema Should be idempotent, because we use a version_history table to track which DML statements have been applied, and which are still required- Parameters:
connection
-adminSchemaName
-dataSchemaName
-- Throws:
SQLException
-
populateResourceTypeAndParameterNameTableEntries
public static void populateResourceTypeAndParameterNameTableEntries(Connection connection, String adminSchemaName, String dataSchemaName)
prepopulates the bootstrapped derby database with static lookup data.- Parameters:
connection
-adminSchemaName
-dataSchemaName
-
-
bootstrapOauthDb
public static void bootstrapOauthDb(DataSource ds) throws Exception
Bootstraps the Liberty OAuth 2.0 tables for supporting management of OAuth 2.0 Clients- Throws:
Exception
-
bootstrapBatchDb
public static void bootstrapBatchDb(DataSource ds) throws SQLException
bootstraps the batch database for derby.- Parameters:
ds
-- Throws:
SQLException
-
-