org.jboss.dashboard.database
Class DatabaseAutoSynchronizer
java.lang.Object
org.jboss.dashboard.database.DatabaseAutoSynchronizer
@ApplicationScoped
public class DatabaseAutoSynchronizer
- extends Object
This component manages the database creation.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
databaseConfigDir
@Inject
protected String databaseConfigDir
installedModulesTable
@Inject
protected String installedModulesTable
excludedScriptStatements
@Inject
protected String[] excludedScriptStatements
customDelimiter
@Inject
protected String customDelimiter
customDelimiterEnabler
@Inject
protected String customDelimiterEnabler
DatabaseAutoSynchronizer
public DatabaseAutoSynchronizer()
synchronize
public void synchronize(HibernateInitializer hibernateInitializer)
throws Exception
- Throws:
Exception
createDatabase
protected void createDatabase(String databaseName)
throws Exception
- Throws:
Exception
runSQLFile
protected void runSQLFile(File f)
throws Exception
- Throws:
Exception
runDDL
protected void runDDL(String ddl)
throws Exception
- Throws:
Exception
removeComments
protected String removeComments(String ddlStatement)
existsModulesTable
protected boolean existsModulesTable(String default_schema)
throws Exception
- Check if the dashbuilder installed modules table exist.
BZ-1030424: Added
default_schema argument to allow finding tables only for a given database schema.
- Parameters:
default_schema - If specified, look up the table only for the specified schema.
- Returns:
- If exist dashbuilder installed modules table
- Throws:
Exception
Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.