use of org.pentaho.di.trans.steps.databaselookup.DatabaseLookupMeta in project pentaho-kettle by pentaho.
the class TransDialog method get.
// Get the dependencies
private void get() {
Table table = wFields.table;
for (int i = 0; i < transMeta.nrSteps(); i++) {
StepMeta stepMeta = transMeta.getStep(i);
String con = null;
String tab = null;
TableItem item = null;
StepMetaInterface sii = stepMeta.getStepMetaInterface();
if (sii instanceof TableInputMeta) {
TableInputMeta tii = (TableInputMeta) stepMeta.getStepMetaInterface();
if (tii.getDatabaseMeta() == null) {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG, "TransDialog.DatabaseMetaNotSet.Text"));
mb.open();
return;
}
con = tii.getDatabaseMeta().getName();
tab = getTableFromSQL(tii.getSQL());
if (tab == null) {
tab = stepMeta.getName();
}
}
if (sii instanceof DatabaseLookupMeta) {
DatabaseLookupMeta dvli = (DatabaseLookupMeta) stepMeta.getStepMetaInterface();
con = dvli.getDatabaseMeta().getName();
tab = dvli.getTablename();
if (tab == null) {
tab = stepMeta.getName();
}
break;
}
if (tab != null || con != null) {
item = new TableItem(table, SWT.NONE);
if (con != null) {
item.setText(1, con);
}
if (tab != null) {
item.setText(2, tab);
}
}
}
wFields.setRowNums();
}
Aggregations