use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class InsertUpdateDialog 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) {
if (log.isDebug()) {
logDebug(BaseMessages.getString(PKG, "InsertUpdateDialog.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, "InsertUpdateDialog.InvalidConnection.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "InsertUpdateDialog.InvalidConnection.DialogTitle"));
mb.open();
}
}
use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class DatabaseLookupDialog 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) {
if (log.isDebug()) {
logDebug(BaseMessages.getString(PKG, "DatabaseLookupDialog.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, "DatabaseLookupDialog.InvalidConnection.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "DatabaseLookupDialog.InvalidConnection.DialogTitle"));
mb.open();
}
}
use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class DeleteDialog 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, "DeleteDialog.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, "DeleteDialog.InvalidConnection.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "DeleteDialog.InvalidConnection.DialogTitle"));
mb.open();
}
}
use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class PGBulkLoaderDialog 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, "PGBulkLoaderDialog.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, "PGBulkLoaderDialog.InvalidConnection.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "PGBulkLoaderDialog.InvalidConnection.DialogTitle"));
mb.open();
}
}
use of org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog in project pentaho-kettle by pentaho.
the class CombinationLookupDialog 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, "CombinationLookupDialog.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, "CombinationLookupDialog.ConnectionError2.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "System.Dialog.Error.Title"));
mb.open();
}
}
Aggregations