Dashboard Builder Commons 6.0.0.Beta1

org.jboss.dashboard.database
Class DatabaseAutoSynchronizer

java.lang.Object
  extended by org.jboss.dashboard.database.DatabaseAutoSynchronizer

@ApplicationScoped
public class DatabaseAutoSynchronizer
extends Object

This component manages the database creation.


Field Summary
static String CUSTOM_DELIMITER
           
static String CUSTOM_DELIMITER_ENABLER
           
static String DATABASE_CONFIG_DIR
           
 
Constructor Summary
DatabaseAutoSynchronizer()
           
 
Method Summary
protected  String createDatabaseScriptPath(String databaseName)
           
protected  void createProductDatabase(String databaseName)
           
protected  boolean existsModulesTable(String databaseName)
           
 Properties getCreateFiles()
           
 String[] getExcludedScriptStatements()
           
 String[] getSupportedDatabases()
           
 String getTestTableExistsSql()
           
 boolean isCurrentDatabaseSupported(String databaseName)
           
protected  String removeComments(String ddlStatement)
           
protected  void runDDL(String ddl)
           
protected  void runScript(String filePath)
           
 void setCreateFiles(Properties createFiles)
           
 void setExcludedScriptStatements(String[] excludedScriptStatements)
           
 void setSupportedDatabases(String[] supportedDatabases)
           
 void setTestTableExistsSql(String testTableExistsSql)
           
 void synchronize(HibernateInitializer hibernateInitializer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM_DELIMITER

public static final String CUSTOM_DELIMITER
See Also:
Constant Field Values

CUSTOM_DELIMITER_ENABLER

public static final String CUSTOM_DELIMITER_ENABLER
See Also:
Constant Field Values

DATABASE_CONFIG_DIR

public static final String DATABASE_CONFIG_DIR
See Also:
Constant Field Values
Constructor Detail

DatabaseAutoSynchronizer

public DatabaseAutoSynchronizer()
Method Detail

getTestTableExistsSql

public String getTestTableExistsSql()

setTestTableExistsSql

public void setTestTableExistsSql(String testTableExistsSql)

getCreateFiles

public Properties getCreateFiles()

setCreateFiles

public void setCreateFiles(Properties createFiles)

getSupportedDatabases

public String[] getSupportedDatabases()

setSupportedDatabases

public void setSupportedDatabases(String[] supportedDatabases)

getExcludedScriptStatements

public String[] getExcludedScriptStatements()

setExcludedScriptStatements

public void setExcludedScriptStatements(String[] excludedScriptStatements)

synchronize

public void synchronize(HibernateInitializer hibernateInitializer)
                 throws Exception
Throws:
Exception

createProductDatabase

protected void createProductDatabase(String databaseName)
                              throws Exception
Throws:
Exception

createDatabaseScriptPath

protected String createDatabaseScriptPath(String databaseName)

runScript

protected void runScript(String filePath)
                  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 databaseName)
                              throws Exception
Throws:
Exception

isCurrentDatabaseSupported

public boolean isCurrentDatabaseSupported(String databaseName)

Dashboard Builder Commons 6.0.0.Beta1

Copyright © 2012-2013 JBoss by Red Hat. All Rights Reserved.