org.lexevs.dao.database.utility
Interface DatabaseUtility

All Known Implementing Classes:
DefaultDatabaseUtility

public interface DatabaseUtility

General Database utility methods.

Author:
Kevin Peterson

Method Summary
 boolean doesTableExist(java.lang.String tableName)
          Does table exist.
 void dropDatabase(java.lang.String databaseName)
          Drop database.
 void executeScript(org.springframework.core.io.Resource creationScript)
          Execute script.
 void executeScript(org.springframework.core.io.Resource creationScript, java.lang.String tableSetPrefix)
           
 void executeScript(org.springframework.core.io.Resource creationScript, java.lang.String commonPrefix, java.lang.String tableSetPrefix)
          Execute script.
 void executeScript(java.lang.String creationScript)
          Execute script.
 void executeScript(java.lang.String creationScript, java.lang.String tableSetPrefix)
           
 void executeScript(java.lang.String creationScript, java.lang.String commonPrefix, java.lang.String tableSetPrefix)
           
 void truncateTable(java.lang.String tableName)
          Truncate table.
 

Method Detail

dropDatabase

void dropDatabase(java.lang.String databaseName)
                  throws java.lang.Exception
Drop database.

Parameters:
databaseName - the database name
Throws:
java.lang.Exception - the exception

truncateTable

void truncateTable(java.lang.String tableName)
                   throws java.lang.Exception
Truncate table.

Parameters:
tableName - the table name
Throws:
java.lang.Exception - the exception

doesTableExist

boolean doesTableExist(java.lang.String tableName)
Does table exist.

Parameters:
tableName - the table name
Returns:
true, if successful

executeScript

void executeScript(org.springframework.core.io.Resource creationScript)
                   throws java.lang.Exception
Execute script.

Parameters:
creationScript - the creation script
Throws:
java.lang.Exception - the exception

executeScript

void executeScript(org.springframework.core.io.Resource creationScript,
                   java.lang.String commonPrefix,
                   java.lang.String tableSetPrefix)
                   throws java.lang.Exception
Execute script.

Parameters:
creationScript - the creation script
prefix - the prefix
Throws:
java.lang.Exception - the exception

executeScript

void executeScript(java.lang.String creationScript,
                   java.lang.String commonPrefix,
                   java.lang.String tableSetPrefix)
                   throws java.lang.Exception
Throws:
java.lang.Exception

executeScript

void executeScript(org.springframework.core.io.Resource creationScript,
                   java.lang.String tableSetPrefix)
                   throws java.lang.Exception
Throws:
java.lang.Exception

executeScript

void executeScript(java.lang.String creationScript)
                   throws java.lang.Exception
Execute script.

Parameters:
creationScript - the creation script
Throws:
java.lang.Exception - the exception

executeScript

void executeScript(java.lang.String creationScript,
                   java.lang.String tableSetPrefix)
                   throws java.lang.Exception
Throws:
java.lang.Exception

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.