Search in sources :

Example 1 with MySQLExportSettings

use of org.jkiss.dbeaver.ext.mysql.tasks.MySQLExportSettings in project dbeaver by dbeaver.

the class MySQLExportWizardPageSettings method saveState.

@Override
public void saveState() {
    super.saveState();
    MySQLExportSettings settings = wizard.getSettings();
    String fileName = outputFolderText.getText();
    wizard.getSettings().setOutputFolder(CommonUtils.isEmpty(fileName) ? null : new File(fileName));
    settings.setOutputFilePattern(outputFileText.getText());
    switch(methodCombo.getSelectionIndex()) {
        case 0:
            settings.setMethod(MySQLExportSettings.DumpMethod.ONLINE);
            break;
        case 1:
            settings.setMethod(MySQLExportSettings.DumpMethod.LOCK_ALL_TABLES);
            break;
        default:
            settings.setMethod(MySQLExportSettings.DumpMethod.NORMAL);
            break;
    }
    settings.setNoCreateStatements(noCreateStatementsCheck.getSelection());
    settings.setAddDropStatements(addDropStatementsCheck.getSelection());
    settings.setDisableKeys(disableKeysCheck.getSelection());
    settings.setExtendedInserts(extendedInsertsCheck.getSelection());
    settings.setDumpEvents(dumpEventsCheck.getSelection());
    settings.setComments(commentsCheck.getSelection());
    settings.setRemoveDefiner(removeDefiner.getSelection());
    settings.setBinariesInHex(binaryInHex.getSelection());
    settings.setNoData(noData.getSelection());
}
Also used : MySQLExportSettings(org.jkiss.dbeaver.ext.mysql.tasks.MySQLExportSettings) File(java.io.File)

Example 2 with MySQLExportSettings

use of org.jkiss.dbeaver.ext.mysql.tasks.MySQLExportSettings in project dbeaver by serge-rider.

the class MySQLExportWizardPageSettings method saveState.

@Override
public void saveState() {
    super.saveState();
    MySQLExportSettings settings = wizard.getSettings();
    String fileName = outputFolderText.getText();
    wizard.getSettings().setOutputFolder(CommonUtils.isEmpty(fileName) ? null : new File(fileName));
    settings.setOutputFilePattern(outputFileText.getText());
    switch(methodCombo.getSelectionIndex()) {
        case 0:
            settings.setMethod(MySQLExportSettings.DumpMethod.ONLINE);
            break;
        case 1:
            settings.setMethod(MySQLExportSettings.DumpMethod.LOCK_ALL_TABLES);
            break;
        default:
            settings.setMethod(MySQLExportSettings.DumpMethod.NORMAL);
            break;
    }
    settings.setNoCreateStatements(noCreateStatementsCheck.getSelection());
    settings.setAddDropStatements(addDropStatementsCheck.getSelection());
    settings.setDisableKeys(disableKeysCheck.getSelection());
    settings.setExtendedInserts(extendedInsertsCheck.getSelection());
    settings.setDumpEvents(dumpEventsCheck.getSelection());
    settings.setComments(commentsCheck.getSelection());
    settings.setRemoveDefiner(removeDefiner.getSelection());
    settings.setBinariesInHex(binaryInHex.getSelection());
    settings.setNoData(noData.getSelection());
}
Also used : MySQLExportSettings(org.jkiss.dbeaver.ext.mysql.tasks.MySQLExportSettings) File(java.io.File)

Aggregations

File (java.io.File)2 MySQLExportSettings (org.jkiss.dbeaver.ext.mysql.tasks.MySQLExportSettings)2