org.kuali.rice.krms.impl.repository
Class PropositionBo

java.lang.Object
  extended by org.kuali.rice.krms.impl.repository.PropositionBo
All Implemented Interfaces:
Serializable, Identifiable, Versioned, PropositionDefinitionContract

@Entity
public class PropositionBo
extends Object
implements PropositionDefinitionContract, Versioned, Serializable

See Also:
Serialized Form

Constructor Summary
PropositionBo()
           
 
Method Summary
static PropositionBo copyProposition(PropositionBo existing)
           
static PropositionBo createCompoundPropositionBoStub(PropositionBo existing, boolean addNewChild)
           
static PropositionBo createCompoundPropositionBoStub2(PropositionBo existing)
           
static PropositionBo createSimplePropositionBoStub(PropositionBo sibling, String pType)
          This method creates a partially populated Simple PropositionBo with three parameters: a term type paramter (value not assigned) a operation parameter a constant parameter (value set to empty string) The returned PropositionBo has an generatedId.
static PropositionBo from(PropositionDefinition im)
          Converts a immutable object to it's mutable bo counterpart
 String getCategoryId()
           
 List<PropositionBo> 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
 DataObjectService getDataObjectService()
           
 String getDescription()
          Returns the description text for the KRMS proposition
 boolean getEditMode()
           
 String getId()
          The unique identifier for an object.
 String getNewTermDescription()
           
 String getParameterDisplayString()
           
 List<PropositionParameterBo> 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.
 boolean getShowCustomValue()
           
 String getTermParameter()
           
 List<TermParameter> getTermParameterList()
           
 Map<String,String> getTermParameters()
           
 String getTermSpecId()
           
 String getTypeId()
          Returns the id of Proposition KrmsType of the proposition.
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isShowCustomValue()
           
 void setCategoryId(String categoryId)
           
 void setCompoundComponents(List<PropositionBo> compoundComponents)
           
 void setCompoundOpCode(String compoundOpCode)
           
 void setCompoundSequenceNumber(Integer compoundSequenceNumber)
           
 void setDescription(String description)
           
 void setEditMode(boolean editMode)
           
 void setId(String id)
           
 void setNewTermDescription(String newTermDescription)
           
 void setParameterDisplayString(String parameterDisplayString)
           
 void setParameters(List<PropositionParameterBo> parameters)
           
 void setPropositionTypeCode(String propositionTypeCode)
           
 void setRuleId(String ruleId)
           
 void setShowCustomValue(boolean showCustomValue)
           
 void setTermParameter(String termParameter)
           
 void setTermParameterList(List<TermParameter> termParameterList)
           
 void setTermParameters(Map<String,String> termParameters)
           
 void setTermSpecId(String componentId)
           
 void setTypeId(String typeId)
          set the typeId.
 void setVersionNumber(Long versionNumber)
           
static PropositionDefinition to(PropositionBo bo)
          Converts a mutable bo to it's immutable counterpart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropositionBo

public PropositionBo()
Method Detail

getParameterDisplayString

public String getParameterDisplayString()
Returns:
the parameterDisplayString

setParameterDisplayString

public void setParameterDisplayString(String parameterDisplayString)
Parameters:
parameterDisplayString - the parameterDisplayString to set

getEditMode

public boolean getEditMode()

setEditMode

public void setEditMode(boolean editMode)

getCategoryId

public String getCategoryId()

setCategoryId

public void setCategoryId(String categoryId)

setTypeId

public void setTypeId(String typeId)
set the typeId. If the parameter is blank, then this PropositionBo's typeId will be set to null

Parameters:
typeId -

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

setVersionNumber

public void setVersionNumber(Long versionNumber)

getTermParameters

public Map<String,String> getTermParameters()

setTermParameters

public void setTermParameters(Map<String,String> termParameters)

getDataObjectService

public DataObjectService getDataObjectService()

to

public static PropositionDefinition to(PropositionBo bo)
Converts a mutable bo to it's immutable counterpart

Parameters:
bo - the mutable business object
Returns:
the immutable object

from

public static PropositionBo from(PropositionDefinition im)
Converts a immutable object to it's mutable bo counterpart

Parameters:
im - immutable object
Returns:
the mutable bo

createSimplePropositionBoStub

public static PropositionBo createSimplePropositionBoStub(PropositionBo sibling,
                                                          String pType)
This method creates a partially populated Simple PropositionBo with three parameters: a term type paramter (value not assigned) a operation parameter a constant parameter (value set to empty string) The returned PropositionBo has an generatedId. The type code and ruleId properties are assigned the same value as the sibling param passed in. Each PropositionParameter has the id generated, and type, sequenceNumber, propId default values set. The value is set to "".

Parameters:
sibling - -
pType -
Returns:
a PropositionBo partially populated.

createCompoundPropositionBoStub

public static PropositionBo createCompoundPropositionBoStub(PropositionBo existing,
                                                            boolean addNewChild)

createCompoundPropositionBoStub2

public static PropositionBo createCompoundPropositionBoStub2(PropositionBo existing)

copyProposition

public static PropositionBo copyProposition(PropositionBo existing)

getTermSpecId

public String getTermSpecId()

setTermSpecId

public void setTermSpecId(String componentId)

isShowCustomValue

public boolean isShowCustomValue()

setShowCustomValue

public void setShowCustomValue(boolean showCustomValue)

getTermParameter

public String getTermParameter()

setTermParameter

public void setTermParameter(String termParameter)

getTermParameterList

public List<TermParameter> getTermParameterList()

setTermParameterList

public void setTermParameterList(List<TermParameter> termParameterList)

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

setId

public void setId(String 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.

setDescription

public void setDescription(String description)

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 ID of the Rule this proposition belongs to.

setRuleId

public void setRuleId(String 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


setPropositionTypeCode

public void setPropositionTypeCode(String propositionTypeCode)

getParameters

public List<PropositionParameterBo> 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

setParameters

public void setParameters(List<PropositionParameterBo> parameters)

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

setCompoundOpCode

public void setCompoundOpCode(String compoundOpCode)

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

setCompoundSequenceNumber

public void setCompoundSequenceNumber(Integer compoundSequenceNumber)

getCompoundComponents

public List<PropositionBo> 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.

setCompoundComponents

public void setCompoundComponents(List<PropositionBo> compoundComponents)

getShowCustomValue

public boolean getShowCustomValue()

getNewTermDescription

public String getNewTermDescription()

setNewTermDescription

public void setNewTermDescription(String newTermDescription)


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