Package ru.bitel.bgbilling.modules.dba.server.bean

# Class ScriptGenerator

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.modules.dba.server.bean.ScriptGenerator

Direct Known Subclasses:
  `BashScriptGenerator`, `BatchScriptGenerator`

public abstract class ScriptGenerator extends ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected String`
  `backupPath`
  `protected List<String>`
  `backupTableList`
  `protected String`
  `databaseName`
  `protected List<String>`
  `deleteTableList`
  `protected String`
  `mysqlCommand`
  `protected String`
  `mysqlDumpCommand`
  `protected StringBuilder`
  `script`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ScriptGenerator(Setup setup, Connection con, int moduleId)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addBackupTable(String tableName)`
  `protected abstract void`
  `addBackupTables()`
  `void`
  `addDeleteTable(String tableName)`
  `protected abstract void`
  `addDeleteTables()`
  `protected abstract void`
  `addScriptHeader()`
  `String`
  `getScript()`
  `void`
  `setBackupPath(String backupPath)`
  `void`
  `setMysqlCommand(String mysqlBinPath)`
  `void`
  `setMysqlDumpCommand(String mysqlDumpCommand)`

  ### Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

  `error, error, error, getLogger, logError, logError, warn`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### script

    protected StringBuilder script

  - ### backupTableList

    protected List<String> backupTableList

  - ### deleteTableList

    protected List<String> deleteTableList

  - ### mysqlCommand

    protected String mysqlCommand

  - ### mysqlDumpCommand

    protected String mysqlDumpCommand

  - ### backupPath

    protected String backupPath

  - ### databaseName

    protected String databaseName

- ## Constructor Details

  - ### ScriptGenerator

    public ScriptGenerator(Setup setup, Connection con, int moduleId)

- ## Method Details

  - ### setBackupPath

    public void setBackupPath(String backupPath)

  - ### setMysqlCommand

    public void setMysqlCommand(String mysqlBinPath)

  - ### addBackupTable

    public void addBackupTable(String tableName)

  - ### addDeleteTable

    public void addDeleteTable(String tableName)

  - ### getScript

    public String getScript() throws Exception
    Throws:
      `Exception`

  - ### addScriptHeader

    protected abstract void addScriptHeader()

  - ### addBackupTables

    protected abstract void addBackupTables()

  - ### addDeleteTables

    protected abstract void addDeleteTables()

  - ### setMysqlDumpCommand

    public void setMysqlDumpCommand(String mysqlDumpCommand)