|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.4.0) E10663-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.rules.sdk2.dictionary.DictionaryObject
oracle.rules.sdk2.dictionary.DictionaryComponent
oracle.rules.sdk2.ruleset.RuleComponent
oracle.rules.sdk2.ruleset.RuleCommon
oracle.rules.sdk2.ruleset.Rule
public class Rule
A Rule consists of a table of Pattern
s to be matched, and a table of Action
s to be taken when a match occurs. See also RuleSet
.
A Rule is structured as a set of nested tables.
Rule Pattern Table SimpleTest Table Action Table
E.g., The following rule has a PatternTable with 2 Patterns. Each pattern has one SimpleTest. The rule has an Action table with two actions. The second action has a parameter table with one parameter.
Rule myRule { if ((fact patternA && patternA.x == 1) && (fact patternB && patternB.y = patternA.y)) { retract(patternB); println(PatternB.y + "retracted"); } }
The following applies to the Rule classes and to the nested classes it uses.
To be valid a Rule is required to have at least one Pattern but is not required to have any Actions.
On output, String properties can be accessed using specific getters, such as getName(), or generic getters, such as getProperty("name"). There are corresponding methods for accessing option lists for the properties and the selected option. See RuleComponent
On input, property values should be set back into the same instances. Use RuleDictionary.update(java.util.List<oracle.rules.sdk2.exception.SDKWarning>)
to accept changes. On input, property values are always Strings.
Input events can be handled through use of specific methods on the classes or using theTableEditor class.
Validation is done when validate() is called rather than at set time.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent |
---|
DictionaryComponent.Diff, DictionaryComponent.DiffType |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary |
---|
Method Summary | |
---|---|
Action |
getAction(int i) Shorthand for getActionTable.getAction(i) |
java.util.List<Action> |
getActions() |
ActionTable |
getActionTable() table of actions for the rule |
TableProperty<Action> |
getActionTableProperty() Get ActionTable Property. |
java.util.List<Expression> |
getCustomizableExpressions() Get the customizable expressions in this rule. |
java.lang.String |
getCustomizableTemplate() |
void |
setCustomizableTemplate(java.lang.String template) Set the customizable template. |
Methods inherited from class oracle.rules.sdk2.ruleset.RuleComponent |
---|
get, getParent, getParentTable, parentAction, parentComponent, parentFunction, parentPattern, parentRule, parentRuleCommon, parentRuleSheet, parentVariable, RHSRuleVariables |
Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent |
---|
clear, containsKey, containsValue, entrySet, get, getAlias, getAlias, getAliasProperty, getAllReferences, getCustom, getDependents, getDescription, getDescriptionProperty, getDiff, getDiffProperties, getDiffs, getFullyQualifiedAlias, getFullyQualifiedName, getName, getNameProperty, getNext, getObjectPath, getOptions, getPrevious, getProperties, getProperty, getSelected, hasDiff, init, isAliasDistinct, isEmpty, isFullyQualifiedName, isNameDistinct, keySet, put, putAll, remove, setAlias, setCustom, setDescription, setName, size, validate, validate, values |
Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryObject |
---|
equals, exists, getAEReferences, getCombinedDataModel, getContainedIDs, getContainedIDs, getDataModel, getDictionary, getID, getIndent, getLevel, getObjectType, getParentByClass, getParentComponent, getParentComponentTable, getParentObject, getReferences, getRuleSet, getState, getWarnings, hashCode, isModified, validate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Method Detail |
---|
public TableProperty<Action> getActionTableProperty()
public ActionTable getActionTable()
public java.util.List<Action> getActions()
getActions
in interface ParentComponent
getActions
in class RuleCommon
public Action getAction(int i)
i
- ordinal of Action to retrieve from ActionTablejava.lang.IndexOutOfBoundsException
public java.util.List<Expression> getCustomizableExpressions()
Rule.getCustomizableTemplate()
public java.lang.String getCustomizableTemplate()
TODO - emulate getRL to actually generate template text
public void setCustomizableTemplate(java.lang.String template)
template
- StringRule.getCustomizableExpressions()
|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.4.0) E10663-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |