use of org.activityinfo.model.analysis.ImmutableTableColumn in project activityinfo by bedatadriven.
the class EffectiveTableModel method addKeyColumns.
private void addKeyColumns(List<EffectiveTableColumn> columns, FormTree.Node node) {
LookupKeySet lookupKeySet = new LookupKeySet(formTree, node.getField());
Map<LookupKey, FormulaNode> formulas = lookupKeySet.getKeyFormulas(node.getFieldId());
for (LookupKey lookupKey : lookupKeySet.getLookupKeys()) {
ImmutableTableColumn tableColumn = ImmutableTableColumn.builder().id(node.getFieldId().asString() + "_k" + lookupKey.getKeyIndex()).formula(formulas.get(lookupKey).toString()).label(lookupKey.getKeyLabel()).build();
columns.add(new EffectiveTableColumn(formTree, tableColumn));
}
}
Aggregations