Class BusinessRule


  • public class BusinessRule
    extends Object
    A class representing a business rule. A business rule is composed by constraints, which are conditions that must be met in order to allow certain actions to be executed.
    Author:
    Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
    • Field Detail

      • TYPE_RELATIONSHIP_BY_CLASS

        public static int TYPE_RELATIONSHIP_BY_CLASS
        Object of class #{appliesTo} can't be related to object of class B
      • TYPE_RELATIONSHIP_BY_RELATIONSHIP_NAME

        public static int TYPE_RELATIONSHIP_BY_RELATIONSHIP_NAME
        Object of class #{appliesTo} can only be related to object B with this set of relationship names (defined in the rule constraints)
      • TYPE_RELATIONSHIP_BY_ATTRIBUTE_VALUE

        public static int TYPE_RELATIONSHIP_BY_ATTRIBUTE_VALUE
        Object of class #{appliesTo} can only be related to object B if ObjectA.attributeA = Z and ObjectB.attributeB = Y
      • TYPE_STANDARD_CONTAINMENT

        public static int TYPE_STANDARD_CONTAINMENT
        Object of class #{appliesTo} can only be child of Object B if Object B has its attribute C set to X (as defined by a rule constraint)
      • TYPE_SPECIAL_CONTAINMENT

        public static int TYPE_SPECIAL_CONTAINMENT
        Object of class #{appliesTo} can only be special child of Object B if Object B has its attribute C set to X (as defined by a rule constraint)
      • SCOPE_GLOBAL

        public static int SCOPE_GLOBAL
        See #{scope} for details
    • Constructor Detail

      • BusinessRule

        public BusinessRule​(long ruleId,
                            String name,
                            String description,
                            String appliesTo,
                            int type,
                            int scope,
                            String version)
      • BusinessRule

        public BusinessRule​(long ruleId,
                            Map<String,​Object> ruleProperties)
    • Method Detail

      • getRuleId

        public long getRuleId()
      • setRuleId

        public void setRuleId​(long ruleId)
      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • getDescription

        public String getDescription()
      • setDescription

        public void setDescription​(String description)
      • getAppliesTo

        public String getAppliesTo()
      • setAppliesTo

        public void setAppliesTo​(String appliesTo)
      • getType

        public int getType()
      • setType

        public void setType​(int type)
      • getScope

        public int getScope()
      • setScope

        public void setScope​(int scope)
      • getVersion

        public String getVersion()
      • setVersion

        public void setVersion​(String version)