Dashboard Builder Commons 6.2.0.Beta3

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
protected  String customDelimiter
           
protected  String customDelimiterEnabler
           
protected  String databaseConfigDir
           
protected  String[] excludedScriptStatements
           
protected  String installedModulesTable
           
 
Constructor Summary
DatabaseAutoSynchronizer()
           
 
Method Summary
protected  void createDatabase(String databaseName)
           
protected  boolean existsModulesTable(String default_schema)
          Check if the dashbuilder installed modules table exist.
protected  String removeComments(String ddlStatement)
           
protected  void runDDL(String ddl)
           
protected  void runSQLFile(File f)
           
 void synchronize(HibernateInitializer hibernateInitializer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

DatabaseAutoSynchronizer

public DatabaseAutoSynchronizer()
Method Detail

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

Dashboard Builder Commons 6.2.0.Beta3

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