|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.knowgate.rules.RuleExecution
public abstract class RuleExecution
RuleExecution
RuleExecution represents an abstract operation performed on a set of data. Rule Executions are composed of three items:
| Constructor Summary | |
|---|---|
RuleExecution(RuleEngine oEngine)
Create RuleExecution on given RuleEngine |
|
RuleExecution(RuleExecution oRexec)
Create copy from another RuleExecution |
|
| Method Summary | |
|---|---|
void |
clear()
Clear all parameters and asserts |
boolean |
getAssert(java.lang.String sAssertKey)
Get status of a given fact |
java.util.HashMap<java.lang.String,java.lang.Boolean> |
getAssertMap()
Get map of assertions used by this RuleExecution |
abstract java.lang.Object |
getExplanation()
Get explanation about how the last result of applying this rule was computed This method must be implemented on eeach derived class for providing the actual behaviour of the RuleExecution instance |
java.lang.Object |
getParam(java.lang.String sKey)
Get parameter value |
java.lang.Object |
getParam(java.lang.String sKey,
java.lang.Object oDefault)
Get parameter value |
java.util.Date |
getParamDate(java.lang.String sKey)
Get parameter as java.util.Date |
java.util.Date |
getParamDate(java.lang.String sKey,
java.util.Date dtDefault)
Get parameter as java.util.Date |
java.math.BigDecimal |
getParamDec(java.lang.String sKey)
Get parameter as BigDecimal |
java.math.BigDecimal |
getParamDec(java.lang.String sKey,
java.math.BigDecimal oDefault)
Get parameter as BigDecimal |
java.lang.Integer |
getParamInt(java.lang.String sKey)
Get parameter as Integer |
java.lang.Integer |
getParamInt(java.lang.String sKey,
java.lang.Integer iDefault)
Get parameter as Integer |
java.util.HashMap<java.lang.String,java.lang.Object> |
getParamMap()
Get map of parameters used by this RuleExecution |
java.lang.String |
getParamStr(java.lang.String sKey)
Get parameter as String |
java.lang.String |
getParamStr(java.lang.String sKey,
java.lang.String sDefault)
Get parameter as String |
abstract java.lang.Object |
getResult()
Get result of applying this rule This method must be implemented on eeach derived class for providing the actual behaviour of the RuleExecution instance |
RuleEngine |
getRuleEngine()
Get RuleEngine to which this RuleExecution belongs |
boolean |
isDefined(java.lang.String sKey)
Find out whether or not a given parameter has a defined value |
boolean |
isNull(java.lang.String sKey)
Find out whether or not a given parameter is null |
void |
resetParam(java.lang.String sKey)
Remove parameter value |
void |
setAssert(java.lang.String sAssertKey,
boolean bTrueOrFalse)
Set true or false status for a fact |
void |
setParam(java.lang.String sKey,
java.lang.Object oValue)
Set value for parameter If parameter already exists then its value is replaced with the new one |
void |
setParams(java.util.Map oMap)
Set values for a set of parameters If parameters already exist then theirs values are replaced with the new ones |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RuleExecution(RuleEngine oEngine)
oEngine - RuleEnginepublic RuleExecution(RuleExecution oRexec)
oRexec - RuleExecution| Method Detail |
|---|
public void clear()
public RuleEngine getRuleEngine()
public void setAssert(java.lang.String sAssertKey,
boolean bTrueOrFalse)
sAssertKey - String A unique key in this RuleExecution for the factbTrueOrFalse - booleanpublic boolean getAssert(java.lang.String sAssertKey)
sAssertKey - String A unique key in this RuleExecution for the fact
public java.util.HashMap<java.lang.String,java.lang.Object> getParamMap()
public java.util.HashMap<java.lang.String,java.lang.Boolean> getAssertMap()
public boolean isNull(java.lang.String sKey)
sKey - String Parameter name
public boolean isDefined(java.lang.String sKey)
sKey - String Parameter Name
public void setParam(java.lang.String sKey,
java.lang.Object oValue)
Set value for parameter
If parameter already exists then its value is replaced with the new one
sKey - String Parameter nameoValue - Objectpublic void resetParam(java.lang.String sKey)
sKey - String Parameter namepublic void setParams(java.util.Map oMap)
oMap - Map of values to be setpublic java.lang.Object getParam(java.lang.String sKey)
Get parameter value
sKey - String Parameter Name
public java.lang.Object getParam(java.lang.String sKey,
java.lang.Object oDefault)
Get parameter value
sKey - String Parameter NameoDefault - Default value
public java.lang.String getParamStr(java.lang.String sKey,
java.lang.String sDefault)
sKey - String Parameter NamesDefault - String Default value
public java.lang.String getParamStr(java.lang.String sKey)
sKey - String Parameter Name
public java.util.Date getParamDate(java.lang.String sKey,
java.util.Date dtDefault)
throws java.lang.ClassCastException
sKey - String Parameter NamedtDefault - Date Default value
java.lang.ClassCastException
public java.util.Date getParamDate(java.lang.String sKey)
throws java.lang.ClassCastException
sKey - String Parameter Name
java.lang.ClassCastException
public java.math.BigDecimal getParamDec(java.lang.String sKey,
java.math.BigDecimal oDefault)
throws java.lang.ClassCastException
sKey - String Parameter NameoDefault - BigDecimal
java.lang.ClassCastException
public java.math.BigDecimal getParamDec(java.lang.String sKey)
throws java.lang.ClassCastException
sKey - String Parameter Name
java.lang.ClassCastException
public java.lang.Integer getParamInt(java.lang.String sKey,
java.lang.Integer iDefault)
throws java.lang.ClassCastException
sKey - String Parameter NameiDefault - Integer Default value
java.lang.ClassCastException
public java.lang.Integer getParamInt(java.lang.String sKey)
throws java.lang.ClassCastException
sKey - String Parameter Name
java.lang.ClassCastException
public abstract java.lang.Object getResult()
throws RuleExecutionException
Get result of applying this rule
This method must be implemented on eeach derived class for providing the actual behaviour of the RuleExecution instance
RuleExecutionException
public abstract java.lang.Object getExplanation()
throws RuleExecutionException
Get explanation about how the last result of applying this rule was computed
This method must be implemented on eeach derived class for providing the actual behaviour of the RuleExecution instance
RuleExecutionException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||