Package com.spun.util.database
Class DatabaseLifeCycleUtils
java.lang.Object
com.spun.util.database.DatabaseLifeCycleUtils
public class DatabaseLifeCycleUtils extends Object
-
Constructor Summary
Constructors Constructor Description DatabaseLifeCycleUtils() -
Method Summary
Modifier and Type Method Description static voidbackupDatabase(Statement stmt, String databaseName, DatabaseConfiguration config, String fileName)static voiddeleteTable(String tableName, int databaseType, Statement stmt)static StringextractText(InputStream inStream)static voidresetTableIndex(String tableName, int databaseType, Statement stmt)static voidrestoreDatabase(Statement stmt, String databaseName, DatabaseConfiguration config, String fileName)
-
Constructor Details
-
DatabaseLifeCycleUtils
public DatabaseLifeCycleUtils()
-
-
Method Details
-
backupDatabase
public static void backupDatabase(Statement stmt, String databaseName, DatabaseConfiguration config, String fileName) throws Exception- Throws:
Exception
-
restoreDatabase
public static void restoreDatabase(Statement stmt, String databaseName, DatabaseConfiguration config, String fileName) throws Exception- Throws:
Exception
-
extractText
- Throws:
IOException
-
deleteTable
public static void deleteTable(String tableName, int databaseType, Statement stmt) throws SQLException- Throws:
SQLException
-
resetTableIndex
public static void resetTableIndex(String tableName, int databaseType, Statement stmt) throws SQLException- Throws:
SQLException
-