Class PropositionDefinition
java.lang.Object
org.kuali.rice.core.api.mo.AbstractDataTransferObject
org.kuali.rice.krms.api.repository.proposition.PropositionDefinition
- All Implemented Interfaces:
Serializable,Identifiable,Versioned,ModelObjectBasic,ModelObjectComplete,PropositionDefinitionContract
public final class PropositionDefinition
extends 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis builder is used to construct instances of KRMS Proposition.static classstatic classA private class which exposes constants which define the XML element names to use when this object is marshalled to XML. -
Method Summary
Modifier and TypeMethodDescriptionReturns the propositions which are contained in a compound proposition.Returns the op code to be used when evaluating compound propositions.Returns the sequence number used to order the compound propositions Note: this value is set by the serviceReturns the description text for the KRMS propositiongetId()Returns the parameter list of the proposition.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.TReturns the ID of the rule this proposition belongs to.Returns the id of Proposition KrmsType of the proposition.Methods inherited from class org.kuali.rice.core.api.mo.AbstractDataTransferObject
afterUnmarshal, beforeUnmarshal, equals, equalsExcludeFields, getDefaultHashCodeEqualsExcludeFields, hashCode, hashCodeExcludeFields, toString
-
Method Details
-
getId
- Specified by:
getIdin interfaceIdentifiable
-
getDescription
Description copied from interface:PropositionDefinitionContractReturns the description text for the KRMS proposition- Specified by:
getDescriptionin interfacePropositionDefinitionContract- Returns:
- description for KRMS type.
-
getRuleId
Description copied from interface:PropositionDefinitionContractTReturns the ID of the rule this proposition belongs to. May be null if this proposition has not yet been persisted.- Specified by:
getRuleIdin interfacePropositionDefinitionContract- Returns:
- the ruleId
-
getTypeId
Description copied from interface:PropositionDefinitionContractReturns the id of Proposition KrmsType of the proposition. It provides some context to what type of object of the KRMS type.- Specified by:
getTypeIdin interfacePropositionDefinitionContract- Returns:
- the id of the KRMS type.
-
getPropositionTypeCode
Description copied from interface:PropositionDefinitionContractThere 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:
getPropositionTypeCodein interfacePropositionDefinitionContract- Returns:
- the proposition type code of the proposition
Valid values are C = compound, P = parameterized, S = simple
-
getParameters
Description copied from interface:PropositionDefinitionContractReturns 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:
getParametersin interfacePropositionDefinitionContract- Returns:
- the Parameters related to the proposition
- See Also:
-
getCompoundOpCode
Description copied from interface:PropositionDefinitionContractReturns the op code to be used when evaluating compound propositions.- Specified by:
getCompoundOpCodein interfacePropositionDefinitionContract- Returns:
- the compound op code. valid values are A = and, O = or
-
getCompoundComponents
Description copied from interface:PropositionDefinitionContractReturns the propositions which are contained in a compound proposition.- Specified by:
getCompoundComponentsin interfacePropositionDefinitionContract- Returns:
- an ordered list of the Propositions which make up the compound proposition.
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceVersioned
-
getCompoundSequenceNumber
Description copied from interface:PropositionDefinitionContractReturns the sequence number used to order the compound propositions Note: this value is set by the service- Specified by:
getCompoundSequenceNumberin interfacePropositionDefinitionContract- Returns:
- the compound sequence number
-