use of org.talend.designer.rowgenerator.ui.editor.MetadataColumnExt in project tdi-studio-se by Talend.
the class UIManager method convert.
/**
* qzhang Comment method "convert".
*
* @param outputMetaTable2
* @return TODO
*/
public void convert(RowGeneratorComponent externalNode, IMetadataTable outputMetaTable2, FunctionManagerExt functionManager) {
List<IMetadataColumn> exts = new ArrayList<IMetadataColumn>();
for (int j = 0; j < outputMetaTable2.getListColumns().size(); j++) {
IMetadataColumn column = outputMetaTable2.getListColumns().get(j);
if (column instanceof MetadataColumnExt) {
exts.add(column.clone());
} else if (column instanceof MetadataColumn) {
MetadataColumnExt ext = new MetadataColumnExt((MetadataColumn) column);
List<Function> funs = functionManager.getFunctionsByType(ext.getTalendType());
ext.setArrayFunctions(functionManager.getFunctionArrays(funs));
if (!funs.isEmpty()) {
Function funtion = functionManager.getFunctionFromColumn(ext);
if (funtion == null) {
funtion = functionManager.getFuntionFromArray(ext, externalNode, j);
}
ext.setFunction(funtion);
}
exts.add(ext);
}
}
outputMetaTable2.setListColumns(exts);
}
Aggregations