use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class TableOutputDialog method getTableName.
private void getTableName() {
// New class: SelectTableDialog
int connr = wConnection.getSelectionIndex();
if (connr >= 0) {
DatabaseMeta inf = transMeta.getDatabase(connr);
if (log.isDebug()) {
logDebug(BaseMessages.getString(PKG, "TableOutputDialog.Log.LookingAtConnection", inf.toString()));
}
DatabaseExplorerDialog std = new DatabaseExplorerDialog(shell, SWT.NONE, inf, transMeta.getDatabases());
std.setSelectedSchemaAndTable(wSchema.getText(), wTable.getText());
if (std.open()) {
wSchema.setText(Const.NVL(std.getSchemaName(), ""));
wTable.setText(Const.NVL(std.getTableName(), ""));
setTableFieldCombo();
}
} else {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG, "TableOutputDialog.ConnectionError2.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "System.Dialog.Error.Title"));
mb.open();
}
}
use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class SQLFileOutputDialog method getTableName.
private void getTableName() {
// New class: SelectTableDialog
int connr = wConnection.getSelectionIndex();
if (connr >= 0) {
DatabaseMeta inf = transMeta.getDatabase(connr);
logDebug(BaseMessages.getString(PKG, "SQLFileOutputDialog.Log.LookingAtConnection", inf.toString()));
DatabaseExplorerDialog std = new DatabaseExplorerDialog(shell, SWT.NONE, inf, transMeta.getDatabases());
std.setSelectedSchemaAndTable(wSchema.getText(), wTable.getText());
if (std.open()) {
wSchema.setText(Const.NVL(std.getSchemaName(), ""));
wTable.setText(Const.NVL(std.getTableName(), ""));
}
} else {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG, "SQLFileOutputDialog.ConnectionError2.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "System.Dialog.Error.Title"));
mb.open();
}
}
use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class JobEntryMysqlBulkFileDialog method getTableName.
private void getTableName() {
// New class: SelectTableDialog
int connr = wConnection.getSelectionIndex();
if (connr >= 0) {
DatabaseMeta inf = jobMeta.getDatabase(connr);
DatabaseExplorerDialog std = new DatabaseExplorerDialog(shell, SWT.NONE, inf, jobMeta.getDatabases());
std.setSelectedSchemaAndTable(wSchemaname.getText(), wTablename.getText());
if (std.open()) {
// wSchemaname.setText(Const.NVL(std.getSchemaName(), ""));
wTablename.setText(Const.NVL(std.getTableName(), ""));
}
} else {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG, "JobMysqlBulkFile.ConnectionError2.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "System.Dialog.Error.Title"));
mb.open();
}
}
use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class JobEntryMssqlBulkLoadDialog method getTableName.
private void getTableName() {
// New class: SelectTableDialog
int connr = wConnection.getSelectionIndex();
if (connr >= 0) {
DatabaseMeta inf = jobMeta.getDatabase(connr);
DatabaseExplorerDialog std = new DatabaseExplorerDialog(shell, SWT.NONE, inf, jobMeta.getDatabases());
std.setSelectedSchemaAndTable(wSchemaname.getText(), wTablename.getText());
if (std.open()) {
wTablename.setText(Const.NVL(std.getTableName(), ""));
}
} else {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG, "JobMssqlBulkLoad.ConnectionError2.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "System.Dialog.Error.Title"));
mb.open();
}
}
use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class JobEntryMysqlBulkLoadDialog method getTableName.
private void getTableName() {
// New class: SelectTableDialog
int connr = wConnection.getSelectionIndex();
if (connr >= 0) {
DatabaseMeta inf = jobMeta.getDatabase(connr);
DatabaseExplorerDialog std = new DatabaseExplorerDialog(shell, SWT.NONE, inf, jobMeta.getDatabases());
std.setSelectedSchemaAndTable(wSchemaname.getText(), wTablename.getText());
if (std.open()) {
wTablename.setText(Const.NVL(std.getTableName(), ""));
}
} else {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG, "JobMysqlBulkLoad.ConnectionError2.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "System.Dialog.Error.Title"));
mb.open();
}
}
Aggregations