use of org.pentaho.di.palo.core.PaloNameComparator in project pentaho-kettle by pentaho.
the class PaloCellOutputDialog method doSelectConnection.
private void doSelectConnection(boolean clearCurrentData) {
try {
if (clearCurrentData) {
tableViewFields.table.removeAll();
comboCube.removeAll();
}
if (addConnectionLine.getText() != null) {
DatabaseMeta dbMeta = transMeta.findDatabase(addConnectionLine.getText());
if (dbMeta != null) {
PaloCellOutputData data = new PaloCellOutputData(dbMeta);
data.helper.connect();
List<String> cubes = data.helper.getCubesNames();
Collections.sort(cubes, new PaloNameComparator());
for (String cubeName : cubes) {
if (comboCube.indexOf(cubeName) == -1) {
comboCube.add(cubeName);
}
}
data.helper.disconnect();
}
}
} catch (Exception ex) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "PaloCellOutputDialog.RetreiveCubesErrorTitle"), BaseMessages.getString(PKG, "PaloCellOutputDialog.RetreiveCubesError"), ex);
}
}
Aggregations