Package org.openl.rules.dt
Class DecisionTable
- java.lang.Object
-
- org.openl.types.impl.AMethod
-
- org.openl.types.impl.ExecutableMethod
-
- org.openl.rules.method.ExecutableRulesMethod
-
- org.openl.rules.dt.DecisionTable
-
- All Implemented Interfaces:
INamedThing,IMetaInfo,IDecisionTable,ITablePropertiesMethod,IMemberMetaInfo,IMethodCaller,IModuleInfo,Invokable,IOpenMember,IOpenMethod,IOpenMethodHeader
- Direct Known Subclasses:
AbstractDecisionTableWrapper
public class DecisionTable extends ExecutableRulesMethod implements IDecisionTable
- Author:
- snshor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDecisionTable.DeferredChange
-
Field Summary
-
Fields inherited from interface org.openl.base.INamedThing
EMPTY, LONG, REGULAR, SHORT
-
Fields inherited from interface org.openl.types.IOpenMethod
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description DecisionTable()DecisionTable(IOpenMethodHeader header, AMethodBasedNode boundNode, boolean typeCustomSpreadsheetResult)
-
Method Summary
-
Methods inherited from class org.openl.rules.method.ExecutableRulesMethod
getBoundNode, getInfo, getMethodProperties, getModuleName, getProperties, getSyntaxNode, initProperties, invoke, isAlias, isMethodCacheable, setBoundNode, setModuleName
-
Methods inherited from class org.openl.types.impl.ExecutableMethod
isConstructor
-
Methods inherited from class org.openl.types.impl.AMethod
getDeclaringClass, getHeader, getName, getSignature, isStatic
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openl.rules.dt.IDecisionTable
getBoundNode, getDeclaringClass, getSignature, getSyntaxNode
-
Methods inherited from interface org.openl.rules.method.ITablePropertiesMethod
getMethodProperties, getProperties
-
-
-
-
Constructor Detail
-
DecisionTable
public DecisionTable()
-
DecisionTable
public DecisionTable(IOpenMethodHeader header, AMethodBasedNode boundNode, boolean typeCustomSpreadsheetResult)
-
-
Method Detail
-
isTypeCustomSpreadsheetResult
public boolean isTypeCustomSpreadsheetResult()
-
setTypeCustomSpreadsheetResult
public void setTypeCustomSpreadsheetResult(boolean typeCustomSpreadsheetResult)
-
getCustomSpreadsheetResultType
public CustomSpreadsheetResultOpenClass getCustomSpreadsheetResultType()
-
setCustomSpreadsheetResultType
public void setCustomSpreadsheetResultType(CustomSpreadsheetResultOpenClass customSpreadsheetResultType)
-
setDim
public void setDim(int dim)
-
getDim
public int getDim()
-
getType
public IOpenClass getType()
- Specified by:
getTypein interfaceIOpenMember- Overrides:
getTypein classAMethod
-
getModule
public ModuleOpenClass getModule()
-
getActionRows
public IBaseAction[] getActionRows()
- Specified by:
getActionRowsin interfaceIDecisionTable
-
setActionRows
public void setActionRows(IAction[] actionRows)
-
getAlgorithm
public IDecisionTableAlgorithm getAlgorithm()
-
getColumns
public int getColumns()
-
setColumns
public void setColumns(int columns)
-
getConditionRows
public IBaseCondition[] getConditionRows()
- Specified by:
getConditionRowsin interfaceIDecisionTable
-
setConditionRows
public void setConditionRows(IBaseCondition[] conditionRows)
-
getDisplayName
public String getDisplayName(int mode)
- Specified by:
getDisplayNamein interfaceIMetaInfo- Specified by:
getDisplayNamein interfaceINamedThing- Overrides:
getDisplayNamein classAMethod
-
getMethod
public IOpenMethod getMethod()
- Specified by:
getMethodin interfaceIDecisionTable- Specified by:
getMethodin interfaceIMethodCaller- Overrides:
getMethodin classAMethod
-
getNumberOfRules
public int getNumberOfRules()
- Specified by:
getNumberOfRulesin interfaceIDecisionTable
-
getRuleName
public String getRuleName(int col)
- Specified by:
getRuleNamein interfaceIDecisionTable
-
getRuleRow
public RuleRow getRuleRow()
-
setRuleRow
public void setRuleRow(RuleRow ruleRow)
-
getRuleTable
public ILogicalTable getRuleTable(int ruleIndex)
Returns logical table that contains rule column. The column will contain all return, action and condition cells for rule specified by index.- Specified by:
getRuleTablein interfaceIDecisionTable- Parameters:
ruleIndex- Index of rule.- Returns:
- ILogicalTable that contains rule column.
-
getSourceUrl
public String getSourceUrl()
- Specified by:
getSourceUrlin interfaceIMetaInfo
-
bindTable
public void bindTable(IBaseCondition[] conditionRows, IBaseAction[] actionRows, RuleRow ruleRow, OpenL openl, ModuleOpenClass module, IBindingContext bindingContext, int columns) throws Exception
- Throws:
Exception
-
getDependencies
public BindingDependencies getDependencies()
- Specified by:
getDependenciesin interfaceIDecisionTable- Specified by:
getDependenciesin interfaceIMemberMetaInfo
-
innerInvoke
protected Object innerInvoke(Object target, Object[] params, IRuntimeEnv env)
- Specified by:
innerInvokein classExecutableRulesMethod
-
shouldFailOnMiss
public boolean shouldFailOnMiss()
Check whether execution of decision table should be failed if no rule fired.
-
toString
public String toString()
- Overrides:
toStringin classExecutableMethod
-
updateDependency
public void updateDependency(BindingDependencies dependencies)
- Specified by:
updateDependencyin interfaceIDecisionTable
-
updateValueDependency
protected void updateValueDependency(FunctionalRow frow, BindingDependencies dependencies)
-
getCondition
public ICondition getCondition(int n)
-
getAction
public IAction getAction(int n)
-
getDtInfo
public DTInfo getDtInfo()
-
setDtInfo
public void setDtInfo(DTInfo dtInfo)
-
getNumberOfConditions
public int getNumberOfConditions()
- Specified by:
getNumberOfConditionsin interfaceIDecisionTable
-
getNumberOfActions
public int getNumberOfActions()
-
clearForExecutionMode
public void clearForExecutionMode()
- Overrides:
clearForExecutionModein classExecutableRulesMethod
-
getDeferredChanges
public List<DecisionTable.DeferredChange> getDeferredChanges()
-
-