Class LocalDatabaseCreator

java.lang.Object
org.wso2.carbon.utils.dbcreator.DatabaseCreator
org.wso2.carbon.andes.utils.LocalDatabaseCreator

public class LocalDatabaseCreator extends org.wso2.carbon.utils.dbcreator.DatabaseCreator

Create MB store database tables based on configurations set

This class contain methods to create database tables for mb store based on given DataSource Configurations.
  • Constructor Details

    • LocalDatabaseCreator

      public LocalDatabaseCreator(DataSource dataSource)
      DataSource will set in super class.
      Parameters:
      dataSource -
  • Method Details

    • createRegistryDatabase

      public void createRegistryDatabase() throws ConfigurationException
      Creates database if the script exists, otherwise returns with exception.
      Overrides:
      createRegistryDatabase in class org.wso2.carbon.utils.dbcreator.DatabaseCreator
      Throws:
      ConfigurationException
    • getDbScriptLocation

      protected String getDbScriptLocation(String databaseType)
      This method returns relevant mb store sql file path based on given database type.
      Overrides:
      getDbScriptLocation in class org.wso2.carbon.utils.dbcreator.DatabaseCreator
      Parameters:
      databaseType - type of the database as a string.
      Returns:
      databaseSqlScriptPath which contain absolute file path to matching sql file.