Class RowExpander
- java.lang.Object
-
- org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.RowExpander
-
public class RowExpander extends Object
A utility class to expand Condition column definitions into rows. Action columns are not expanded, as the use-case is that a user-determined action should be specified for each combination of Conditions. Where a column is defined as having multiple values (Guvnor enum, Java enum or Decision Table Value List) the number of rows is the Cartesian Product of all combinations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classRowExpander.RowIteratorAn iterator that retrieves the expanded rows one at a time
-
Constructor Summary
Constructors Constructor Description RowExpander(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52 model, org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle oracle)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.RowExpander.ColumnValues>getColumns()RowExpander.RowIteratoriterator()Rather than return a List of rows as the expanded form we expose an Iterator with which the expanded form can be retrieved.voidsetExpandColumn(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn column, boolean expandColumn)Indicate whether the provided column should be expanded or not.
-
-
-
Method Detail
-
getColumns
public List<org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.RowExpander.ColumnValues> getColumns()
-
iterator
public RowExpander.RowIterator iterator()
Rather than return a List of rows as the expanded form we expose an Iterator with which the expanded form can be retrieved. This decision was to avoid potentially hugh transient Lists being created; as the results from this class will be transformed into other representations.- Returns:
-
setExpandColumn
public void setExpandColumn(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn column, boolean expandColumn)Indicate whether the provided column should be expanded or not. If the column was not part of the Decision Table used in the Constructor no action is taken.- Parameters:
column-expandColumn-
-
-