Class ScriptGenerator
java.lang.Object
ru.bitel.bgbilling.modules.dba.server.bean.ScriptGenerator
- Direct Known Subclasses:
BashScriptGenerator
,BatchScriptGenerator
public abstract class ScriptGenerator
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
backupPath
protected java.util.List<java.lang.String>
backupTableList
protected java.lang.String
databaseName
protected java.util.List<java.lang.String>
deleteTableList
protected java.lang.String
mysqlCommand
protected java.lang.String
mysqlDumpCommand
protected java.lang.StringBuilder
script
-
Constructor Summary
Constructors Constructor Description ScriptGenerator(Setup setup, java.sql.Connection con, int moduleId)
-
Method Summary
Modifier and Type Method Description void
addBackupTable(java.lang.String tableName)
protected abstract void
addBackupTables()
void
addDeleteTable(java.lang.String tableName)
protected abstract void
addDeleteTables()
protected abstract void
addScriptHeader()
java.lang.String
getScript()
void
setBackupPath(java.lang.String backupPath)
void
setMysqlCommand(java.lang.String mysqlBinPath)
void
setMysqlDumpCommand(java.lang.String mysqlDumpCommand)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
script
protected java.lang.StringBuilder script -
backupTableList
protected java.util.List<java.lang.String> backupTableList -
deleteTableList
protected java.util.List<java.lang.String> deleteTableList -
mysqlCommand
protected java.lang.String mysqlCommand -
mysqlDumpCommand
protected java.lang.String mysqlDumpCommand -
backupPath
protected java.lang.String backupPath -
databaseName
protected java.lang.String databaseName
-
-
Constructor Details
-
ScriptGenerator
-
-
Method Details
-
setBackupPath
public void setBackupPath(java.lang.String backupPath) -
setMysqlCommand
public void setMysqlCommand(java.lang.String mysqlBinPath) -
addBackupTable
public void addBackupTable(java.lang.String tableName) -
addDeleteTable
public void addDeleteTable(java.lang.String tableName) -
getScript
public java.lang.String getScript() -
addScriptHeader
protected abstract void addScriptHeader() -
addBackupTables
protected abstract void addBackupTables() -
addDeleteTables
protected abstract void addDeleteTables() -
setMysqlDumpCommand
public void setMysqlDumpCommand(java.lang.String mysqlDumpCommand)
-