IntegrationEntityLookup lookup = wizard.getItemLookup();
switch (st) {
case Source:
Source source = lookup.getEntity(tx.getSourceId(), Source.class);
if (source != null) {
return new DatabaseStructureWizardPageChain(wizard, source);
}
break;
case Target:
Target target = lookup.getEntity(tx.getTargetId(), Target.class);
if (target != null) {
return new DatabaseStructureWizardPageChain(wizard, target);
}
break;
default:
throw new RuntimeException();
}
EntityExplorerSupport support = wizard.getEntityExplorerSupport();
return new DatabaseStructureWizardPageChain(wizard, support, st);
}