ilog.rules.factory

Class IlrRuleFactory

  • java.lang.Object
    • ilog.rules.factory.IlrRuleFactory
  • All Implemented Interfaces:
    ilog.rules.factory.IlrRuleElement, ilog.rules.factory.IlrRulesetElement, java.io.Serializable


    public class IlrRuleFactory
    extends java.lang.Object
    implements java.io.Serializable, ilog.rules.factory.IlrRuleElement
    A rule definition of the rule language.

    Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short-term storage or RMI between applications running the same version of IBM Decision Server.

    See Also:
    Serialized Form
    • Field Detail

      • name

        public java.lang.String name
        The fully qualified name of the rule.
      • packetName

        public java.lang.String packetName
        Deprecated. 
        The packet name of the rule.
      • formalComment

        public java.lang.String formalComment
        The formal comment of the rule.
      • priority

        public IlrValue priority
        The priority value of the rule.
    • Constructor Detail

      • IlrRuleFactory

        public IlrRuleFactory(IlrReflect reflect,
                      java.lang.String definitionName)
        Deprecated. Use instead IlrRuleFactory(IlrReflect reflect, IlrPackageFactory pkg, String definitionName)
        Constructs a rule factory using a reflect and a rule name. The constructed rule factory has neither packet name nor formal comment. The rule is considered to belong to the default package. It is attached to the reflect object passed as an argument. The priority is set to have the default priority value. Both the condition and the action parts are empty.
        Parameters:
        reflect - The reflect object of this rule factory.
        definitionName - The name of the rule.
      • IlrRuleFactory

        public IlrRuleFactory(IlrReflect reflect,
                      IlrPackageFactory pkg,
                      java.lang.String name)
        Constructs a rule factory using a reflect and a rule name. The constructed rule factory has neither packet name nor formal comment. The rule belongs to the specified package. In case the package is null, the rule is considered to belong to the default package. It is attached to the reflect object passed as an argument. The priority is set to have the default priority value. Both the condition and the action parts are empty.
        Parameters:
        reflect - The reflect object of this rule factory.
        pkg - The package to which the rule belongs.
        name - The name of the rule.
    • Method Detail

      • getProperties

        public final IlrPropertyList getProperties()
        Gets the property list of this rule factory.
        Returns:
        A property list.
      • addCondition

        public final void addCondition(IlrCondition cond)
        Adds a condition to the rule. The condition passed as the argument becomes the last condition of the rule.
        Parameters:
        cond - The condition to be added.
      • removeCondition

        public final void removeCondition(IlrCondition cond)
        Removes a condition from the rule.
        Parameters:
        cond - The condition to be removed.
      • getConditionCount

        public final int getConditionCount()
        Gets the number of conditions in the rule.
        Returns:
        The number of conditions in the rule.
      • getConditions

        public final IlrCondition[] getConditions()
        Gets the conditions of the rule.
        Returns:
        An array of conditions.
      • setConditions

        public final void setConditions(IlrCondition[] conditions)
        Sets the conditions of the rule.
        Parameters:
        conditions - The conditions to be set.
      • enumerateConditions

        public final java.util.Enumeration enumerateConditions()
        Gets an enumeration to visit all the conditions of the rule.
        Returns:
        An enumeration.
      • addStatement

        public final void addStatement(IlrStatement statement)
        Adds an action to the rule. The action becomes the last action of the rule.
        Parameters:
        statement - The action to be added.
      • removeStatement

        public final void removeStatement(IlrStatement statement)
        Removes an action from the rule.
        Parameters:
        statement - The action to be removed.
      • getStatementCount

        public final int getStatementCount()
        Gets the number of actions.
        Returns:
        The number of actions.
      • getStatements

        public final IlrStatement[] getStatements()
        Gets the actions of the rule.
        Returns:
        The actions of the rule.
      • enumerateStatements

        public final java.util.Enumeration enumerateStatements()
        Gets an enumeration to visit all the actions of the rule.
        Returns:
        An enumeration of the rule's actions.
      • setStatements

        public final void setStatements(IlrStatement[] statements)
        Set the actions of the rule.
        Parameters:
        statements - The actions to be set.
      • addElseStatement

        public final void addElseStatement(IlrStatement statement)
        Appends an action to the rule's else part.
        Parameters:
        statement - The action to be appended.
      • removeElseStatement

        public final void removeElseStatement(IlrStatement statement)
        Removes an action from the rule's else part.
        Parameters:
        statement - The action to be removed.
      • getElseStatementCount

        public final int getElseStatementCount()
        Gets the number of actions in the else part. This method returns 0 when the else part does not exist or is empty.
        Returns:
        The number of actions in the else part.
      • getElseStatements

        public final IlrStatement[] getElseStatements()
        Gets the actions of the rule's else part.
        Returns:
        The actions of the rule's else part.
      • enumerateElseStatements

        public final java.util.Enumeration enumerateElseStatements()
        Gets an enumeration to visit all the actions of the rule's else part.
        Returns:
        An enumeration of the rule's else part.
      • setElseStatements

        public final void setElseStatements(IlrStatement[] statements)
        Sets the actions of the rule's else part.
        Parameters:
        statements - The actions to be set.
      • getPackage

        public IlrPackageFactory getPackage()
        Returns the package in which the rule is defined.
        Returns:
        The package that contains the rule.
      • getShortName

        public java.lang.String getShortName()
        Gets the short name of the rule.
        Returns:
        The short name of the rule.

© Copyright IBM Corp. 1987, 2017