Package org.openl.rules.dt.element
Class FunctionalRow
- java.lang.Object
-
- org.openl.rules.dt.element.FunctionalRow
-
- All Implemented Interfaces:
IDecisionRow,IBaseDecisionRow
public abstract class FunctionalRow extends Object implements IDecisionRow
- Author:
- snshor
-
-
Field Summary
Fields Modifier and Type Field Description protected CompositeMethodmethodprotected BitSetparamInitializedprotected IParameterDeclaration[]paramsprotected Set<String>paramsUniqueNamesprotected IOpenClassruleExecutionTypeprotected IStorage<?>[]storage
-
Method Summary
-
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.element.IDecisionRow
isAction, isCondition
-
-
-
-
Field Detail
-
method
protected CompositeMethod method
-
ruleExecutionType
protected IOpenClass ruleExecutionType
-
params
protected IParameterDeclaration[] params
-
paramInitialized
protected BitSet paramInitialized
-
storage
protected IStorage<?>[] storage
-
-
Method Detail
-
getInfoTable
public ILogicalTable getInfoTable()
- Specified by:
getInfoTablein interfaceIDecisionRow
-
getName
public String getName()
- Specified by:
getNamein interfaceIBaseDecisionRow
-
getMethod
public CompositeMethod getMethod()
- Specified by:
getMethodin interfaceIBaseDecisionRow
-
getParams
public IParameterDeclaration[] getParams()
- Specified by:
getParamsin interfaceIBaseDecisionRow
-
clearParamValues
public void clearParamValues()
- Specified by:
clearParamValuesin interfaceIDecisionRow
-
getSourceCodeModule
public IOpenSourceCodeModule getSourceCodeModule()
- Specified by:
getSourceCodeModulein interfaceIBaseDecisionRow- Specified by:
getSourceCodeModulein interfaceIDecisionRow
-
getNumberOfParams
public int getNumberOfParams()
- Specified by:
getNumberOfParamsin interfaceIBaseDecisionRow
-
getDecisionTable
public ILogicalTable getDecisionTable()
Whole representation of decision table. Horizontal representation of the table where conditions are listed from top to bottom. And must be read from left to right Example:Rule Rule Rule1 Rule2 Rule3 C1 paramLocal1==paramInc String paramLocal1 Local Param 1 value11 value12 value13 C2 paramLocal2==paramInc String paramLocal2 Local Param 2 value21 value22 value23 - Specified by:
getDecisionTablein interfaceIBaseDecisionRow- Returns:
TRUEif table is horizontal.
-
getParamPresentation
public String[] getParamPresentation()
- Specified by:
getParamPresentationin interfaceIDecisionRow
-
hasDeclaredParams
public boolean hasDeclaredParams()
- Specified by:
hasDeclaredParamsin interfaceIDecisionRow
-
prepare
public void prepare(DecisionTable table, IOpenClass methodType, IMethodSignature signature, OpenL openl, IBindingContext bindingContext, RuleRow ruleRow, IOpenClass ruleExecutionType, TableSyntaxNode tableSyntaxNode) throws Exception
- Specified by:
preparein interfaceIDecisionRow- Throws:
Exception
-
prepareParams
protected void prepareParams(IOpenClass declaringClass, IMethodSignature signature, IOpenClass methodType, IOpenSourceCodeModule methodSource, OpenL openl, IBindingContext bindingContext) throws Exception
- Throws:
Exception
-
prepareParams
public void prepareParams(OpenL openl, IBindingContext bindingContext)
- Specified by:
prepareParamsin interfaceIDecisionRow
-
getValueCell
public ILogicalTable getValueCell(int column)
- Specified by:
getValueCellin interfaceIBaseDecisionRow
-
getCodeTable
public ILogicalTable getCodeTable()
-
getParamsTable
public ILogicalTable getParamsTable()
-
nValues
public int nValues()
-
getExpressionSource
protected IOpenSourceCodeModule getExpressionSource(TableSyntaxNode tableSyntaxNode, IMethodSignature signature, IOpenClass methodType, IOpenClass declaringClass, OpenL openl, IBindingContext bindingContext) throws Exception
- Throws:
Exception
-
getParamValue
public Object getParamValue(int paramIndex, int ruleN)
- Specified by:
getParamValuein interfaceIBaseDecisionRow- Specified by:
getParamValuein interfaceIDecisionRow
-
isEmpty
public boolean isEmpty(int ruleN)
- Specified by:
isEmptyin interfaceIBaseDecisionRow
-
hasFormula
public boolean hasFormula(int ruleN)
- Specified by:
hasFormulain interfaceIBaseDecisionRow- Specified by:
hasFormulain interfaceIDecisionRow
-
getNumberOfRules
public int getNumberOfRules()
- Specified by:
getNumberOfRulesin interfaceIBaseDecisionRow
-
loadValues
public void loadValues(Object[] dest, int offset, int ruleN, Object target, Object[] tableParams, IRuntimeEnv env)
- Specified by:
loadValuesin interfaceIDecisionRow
-
loadValue
public Object loadValue(int row, int ruleN, Object target, Object[] tableParams, IRuntimeEnv env)
- Specified by:
loadValuein interfaceIDecisionRow
-
hasFormulas
public boolean hasFormulas()
- Specified by:
hasFormulasin interfaceIDecisionRow
-
getStorage
public IStorage<?>[] getStorage()
-
getStorageValue
public Object getStorageValue(int paramNum, int ruleNum)
-
removeDebugInformation
public void removeDebugInformation()
- Specified by:
removeDebugInformationin interfaceIBaseDecisionRow
-
isEqual
public boolean isEqual(int rule1, int rule2)- Specified by:
isEqualin interfaceIDecisionRow
-
-