Class PropositionDefinition

java.lang.Object
org.kuali.rice.core.api.mo.AbstractDataTransferObject
org.kuali.rice.krms.api.repository.proposition.PropositionDefinition
All Implemented Interfaces:
Serializable, org.kuali.rice.core.api.mo.common.Identifiable, org.kuali.rice.core.api.mo.common.Versioned, org.kuali.rice.core.api.mo.ModelObjectBasic, org.kuali.rice.core.api.mo.ModelObjectComplete, PropositionDefinitionContract

public final class PropositionDefinition extends org.kuali.rice.core.api.mo.AbstractDataTransferObject implements PropositionDefinitionContract
Concrete model object implementation of KRMS Proposition. Immutable. Instances of Proposition can be (un)marshalled to and from XML. There are three main types of Propositions: 1. Compound Propositions - a proposition consisting of other propositions and a boolean algebra operator (AND, OR) defining how to evaluate those propositions. 2. Parameterized Propositions - a proposition which is parameterized by some set of values, evaluation logic is implemented by hand and returns true or false 3. Simple Propositions - a proposition of the form lhs op rhs where lhs=left-hand side, rhs=right-hand side, and op=operator Propositions are reference by a rule or another proposition (in the case of compound propositions). Propositions are never re-used across multiple rules. Each proposition can have zero or more parameters. The proposition parameter is the primary data element used to define the proposition. (@see PropositionParameter)
See Also:
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.kuali.rice.core.api.mo.common.Identifiable
    • getDescription

      public String getDescription()
      Description copied from interface: PropositionDefinitionContract
      Returns the description text for the KRMS proposition
      Specified by:
      getDescription in interface PropositionDefinitionContract
      Returns:
      description for KRMS type.
    • getRuleId

      public String getRuleId()
      Description copied from interface: PropositionDefinitionContract
      TReturns the ID of the rule this proposition belongs to. May be null if this proposition has not yet been persisted.
      Specified by:
      getRuleId in interface PropositionDefinitionContract
      Returns:
      the ruleId
    • getTypeId

      public String getTypeId()
      Description copied from interface: PropositionDefinitionContract
      Returns the id of Proposition KrmsType of the proposition. It provides some context to what type of object of the KRMS type.
      Specified by:
      getTypeId in interface PropositionDefinitionContract
      Returns:
      the id of the KRMS type.
    • getPropositionTypeCode

      public String getPropositionTypeCode()
      Description copied from interface: PropositionDefinitionContract

      There are three main types of Propositions: Compound Propositions - a proposition consisting of other propositions and a boolean algebra operator (AND, OR) defining how to evaluate those propositions. Parameterized Propositions - a proposition which is parameterized by some set of values, evaluation logic is implemented by hand and returns true or false Simple Propositions - a proposition of the form lhs op rhs where lhs=left-hand side, rhs=right-hand side, and op=operator

      Specified by:
      getPropositionTypeCode in interface PropositionDefinitionContract
      Returns:
      the proposition type code of the proposition

      Valid values are C = compound, P = parameterized, S = simple

    • getParameters

      public List<PropositionParameter> getParameters()
      Description copied from interface: PropositionDefinitionContract
      Returns the parameter list of the proposition. Parameters are listed in Reverse Polish Notation. Parameters may be constants, terms, or functions.

      Compound Propositions will have an empty parameter list.

      Specified by:
      getParameters in interface PropositionDefinitionContract
      Returns:
      the Parameters related to the proposition
      See Also:
    • getCompoundOpCode

      public String getCompoundOpCode()
      Description copied from interface: PropositionDefinitionContract
      Returns the op code to be used when evaluating compound propositions.
      Specified by:
      getCompoundOpCode in interface PropositionDefinitionContract
      Returns:
      the compound op code. valid values are A = and, O = or
    • getCompoundComponents

      public List<PropositionDefinition> getCompoundComponents()
      Description copied from interface: PropositionDefinitionContract
      Returns the propositions which are contained in a compound proposition.
      Specified by:
      getCompoundComponents in interface PropositionDefinitionContract
      Returns:
      an ordered list of the Propositions which make up the compound proposition.
    • getVersionNumber

      public Long getVersionNumber()
      Specified by:
      getVersionNumber in interface org.kuali.rice.core.api.mo.common.Versioned
    • getCompoundSequenceNumber

      public Integer getCompoundSequenceNumber()
      Description copied from interface: PropositionDefinitionContract
      Returns the sequence number used to order the compound propositions Note: this value is set by the service
      Specified by:
      getCompoundSequenceNumber in interface PropositionDefinitionContract
      Returns:
      the compound sequence number