Class DerbyBootstrapper


  • public class DerbyBootstrapper
    extends Object
    This class contains bootstrapping code for the Derby Database.
    • Constructor Detail

      • DerbyBootstrapper

        public DerbyBootstrapper()
    • 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