Drools Workbench - Guided Decision Table Editor - Client 6.2.0.CR3

org.drools.workbench.screens.guided.dtable.client.wizard.pages
Class RowExpander

java.lang.Object
  extended by org.drools.workbench.screens.guided.dtable.client.wizard.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 Conditons. 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
 class RowExpander.RowIterator
          An iterator that retrieves the expanded rows one at a time
 
Constructor Summary
RowExpander(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52 model, org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle oracle)
          Constructor
 
Method Summary
 List<org.drools.workbench.screens.guided.dtable.client.wizard.pages.RowExpander.ColumnValues> getColumns()
           
 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.
 void setExpandColumn(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn column, boolean expandColumn)
          Indicate whether the provided column should be expanded or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowExpander

public RowExpander(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52 model,
                   org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle oracle)
Constructor

Parameters:
model -
oracle -
Method Detail

getColumns

public List<org.drools.workbench.screens.guided.dtable.client.wizard.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 -

Drools Workbench - Guided Decision Table Editor - Client 6.2.0.CR3

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.