org.kuali.rice.krms.api.repository.proposition
Class PropositionDefinition

java.lang.Object
  extended by org.kuali.rice.core.api.mo.AbstractDataTransferObject
      extended by 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:
PropositonContract, PropositionParameterContract, Serialized Form

Nested Class Summary
static class PropositionDefinition.Builder
          This builder is used to construct instances of KRMS Proposition.
static class PropositionDefinition.Cache
           
static class PropositionDefinition.Elements
          A private class which exposes constants which define the XML element names to use when this object is marshalled to XML.
 
Method Summary
 List<PropositionDefinition> getCompoundComponents()
          Returns the propositions which are contained in a compound proposition.
 String getCompoundOpCode()
          Returns the op code to be used when evaluating compound propositions.
 Integer getCompoundSequenceNumber()
          Returns the sequence number used to order the compound propositions Note: this value is set by the service
 String getDescription()
          Returns the description text for the KRMS proposition
 String getId()
          The unique identifier for an object.
 List<PropositionParameter> getParameters()
          Returns the parameter list of the proposition.
 String getPropositionTypeCode()
           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.
 String getRuleId()
          TReturns the ID of the rule this proposition belongs to.
 String getTypeId()
          Returns the id of Proposition KrmsType of the proposition.
 Long getVersionNumber()
          Returns the version number for this object.
 
Methods inherited from class org.kuali.rice.core.api.mo.AbstractDataTransferObject
afterUnmarshal, beforeUnmarshal, equals, equalsExcludeFields, getDefaultHashCodeEqualsExcludeFields, hashCode, hashCodeExcludeFields, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

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:
PropositionParameter

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()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

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


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.