use of org.talend.dq.nodes.DBColumnRepNode in project tdq-studio-se by Talend.
the class ColumnsMapSelectionDialog method buildUserMap.
/**
* DOC xqliu Comment method "buildUserMap".
*
* @param allCheckedElements
*/
private void buildUserMap(List<IRepositoryNode> allCheckedElements) {
if (allCheckedElements != null && !allCheckedElements.isEmpty()) {
List<TdColumn> userColumnsAll = new ArrayList<TdColumn>();
for (IRepositoryNode node : allCheckedElements) {
if (node instanceof DBColumnRepNode) {
userColumnsAll.add(((DBColumnRepNode) node).getTdColumn());
}
}
Set<ColumnSet> keySet = this.allMap.keySet();
for (ColumnSet cs : keySet) {
List<TdColumn> userColumns = new ArrayList<TdColumn>();
List<TdColumn> list = this.allMap.get(cs);
for (TdColumn column : list) {
if (userColumnsAll.contains(column)) {
userColumns.add(column);
}
}
if (!userColumns.isEmpty()) {
this.userMap.put(cs, userColumns);
}
}
}
}
Aggregations