Package org.wso2.carbon.andes.utils
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 Summary
ConstructorsConstructorDescriptionLocalDatabaseCreator(DataSource dataSource) DataSource will set in super class. -
Method Summary
Modifier and TypeMethodDescriptionvoidCreates database if the script exists, otherwise returns with exception.protected StringgetDbScriptLocation(String databaseType) This method returns relevant mb store sql file path based on given database type.Methods inherited from class org.wso2.carbon.utils.dbcreator.DatabaseCreator
checkStringBufferEndsWith, getDatabaseType, getDatabaseType, isDatabaseStructureCreated
-
Constructor Details
-
LocalDatabaseCreator
DataSource will set in super class.- Parameters:
dataSource-
-
-
Method Details
-
createRegistryDatabase
Creates database if the script exists, otherwise returns with exception.- Overrides:
createRegistryDatabasein classorg.wso2.carbon.utils.dbcreator.DatabaseCreator- Throws:
ConfigurationException
-
getDbScriptLocation
This method returns relevant mb store sql file path based on given database type.- Overrides:
getDbScriptLocationin classorg.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.
-