use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class ColumnExistsDialog method getTableName.
private void getTableName() {
// New class: SelectTableDialog
int connr = wConnection.getSelectionIndex();
if (connr >= 0) {
DatabaseMeta inf = transMeta.getDatabase(connr);
DatabaseExplorerDialog std = new DatabaseExplorerDialog(shell, SWT.NONE, inf, transMeta.getDatabases());
std.setSelectedSchemaAndTable(wSchemaname.getText(), wTablenameText.getText());
if (std.open()) {
wSchemaname.setText(Const.NVL(std.getSchemaName(), ""));
wTablenameText.setText(Const.NVL(std.getTableName(), ""));
}
} else {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG, "ColumnExistsDialog.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 JobEntryWaitForSQLDialog 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, "JobEntryWaitForSQL.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 MonetDBBulkLoaderDialog method getTableName.
protected void getTableName() {
DatabaseMeta inf = null;
// New class: SelectTableDialog
int connr = -1;
if (wConnection != null && wConnection.getCComboWidget() != null) {
connr = wConnection.getCComboWidget().getSelectionIndex();
}
if (connr >= 0) {
inf = transMeta.getDatabase(connr);
}
if (inf != null) {
if (log.isDebug()) {
logDebug(BaseMessages.getString(PKG, "MonetDBBulkLoaderDialog.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, "MonetDBBulkLoaderDialog.InvalidConnection.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "MonetDBBulkLoaderDialog.InvalidConnection.DialogTitle"));
mb.open();
}
}
use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class LucidDBStreamingLoaderDialog method getTableName.
private void getTableName() {
DatabaseMeta inf = null;
// New class: SelectTableDialog
int connr = wConnection.getSelectionIndex();
if (connr >= 0) {
inf = transMeta.getDatabase(connr);
}
if (inf != null) {
logDebug(BaseMessages.getString(PKG, "LucidDBStreamingLoaderDialog.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, "LucidDBStreamingLoaderDialog.InvalidConnection.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "LucidDBStreamingLoaderDialog.InvalidConnection.DialogTitle"));
mb.open();
}
}
use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class JobEntryTableExistsDialog 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, "System.Dialog.ConnectionError.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "System.Dialog.Error.Title"));
mb.open();
}
}
Aggregations