Class PropositionParameter.Builder
java.lang.Object
org.kuali.rice.krms.api.repository.proposition.PropositionParameter.Builder
- 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.ModelBuilder,PropositionParameterContract
- Enclosing class:
PropositionParameter
public static class PropositionParameter.Builder
extends Object
implements PropositionParameterContract, org.kuali.rice.core.api.mo.ModelBuilder, Serializable
This builder is used to construct instances of PropositionParameter.
It enforces the constraints of the
PropositionParameterContract.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance of a PropositionParameter based on the current state of the builder.static PropositionParameter.BuilderCreate a builder using the given valuesstatic PropositionParameter.Buildercreate(PropositionParameter propositionParameter) Creates a builder by populating it with data from the givenPropositionParameterContract.static PropositionParameter.Buildercreate(PropositionParameter.Builder inputBuilder) Creates a builder by populating it with data from the givenPropositionParameterContract.static PropositionParameter.Buildercreate(PropositionParameterContract contract) Creates a builder by populating it with data from the givenPropositionParameterContract.getId()Returns the type of the parameter.Returns the Id for the parent proposition.Returns the sequence number of the proposition parameter.Returns the term value of the proposition parameter if the proposition parameter is a term.getValue()Returns the value of the proposition parametervoidSets the value of the id on this builder to the given value.voidsetParameterType(String parameterType) Sets the value of the parameterType on this builder to the given value.voidSets the value of the propId on this builder to the given value.voidsetProposition(PropositionDefinition.Builder proposition) Sets the value of the proposition on this builder to the given value.voidsetSequenceNumber(Integer sequenceNumber) Sets the value of the sequenceNumber on this builder to the given value.voidsetTermValue(TermDefinition termValue) Sets the value of the termValue on this builder to the given value.voidSets the value of the value on this builder to the given value.voidsetVersionNumber(Long versionNumber) Sets the value of the versionNumber on this builder to the given value.
-
Method Details
-
create
public static PropositionParameter.Builder create(String id, String propId, String value, String parameterType, Integer sequenceNumber) Create a builder using the given values- Parameters:
id- the id value to set, must not be null or blankpropId- the propId value to set, must not be null or blankvalue- the value value to set, must not be null or blankparameterType- the value parameterType to set, must not be null or blanksequenceNumber- the value sequenceNumber to set, must not be null or blank- Returns:
- Builder with the given values set
-
create
Creates a builder by populating it with data from the givenPropositionParameterContract.- Parameters:
contract- the contract from which to populate this builder- Returns:
- an instance of the builder populated with data from the contract
-
create
Creates a builder by populating it with data from the givenPropositionParameterContract.- Parameters:
propositionParameter- the contract from which to populate this builder- Returns:
- an instance of the builder populated with data from the contract
-
create
Creates a builder by populating it with data from the givenPropositionParameterContract.- Parameters:
inputBuilder- the contract from which to populate this builder- Returns:
- an instance of the builder populated with data from the contract
-
setId
Sets the value of the id on this builder to the given value.- Parameters:
id- the id value to set, must not be null or blank- Throws:
IllegalArgumentException- if the id is null or blank
-
setPropId
Sets the value of the propId on this builder to the given value.- Parameters:
propId- the propId value to set, must not be null or blank- Throws:
IllegalArgumentException- if the propId is null or blank
-
setValue
Sets the value of the value on this builder to the given value.- Parameters:
value- the value value to set, may be null, otherwise must contain non-whitespace- Throws:
IllegalArgumentException- if the value is all whitespace characters
-
setTermValue
Sets the value of the termValue on this builder to the given value.- Parameters:
termValue- the termValue value to set, may be null
-
setParameterType
Sets the value of the parameterType on this builder to the given value.- Parameters:
parameterType- the value parameterType to set, must not be null or blank- Throws:
IllegalArgumentException- if the parameterType is null, blank, or invalid
-
setSequenceNumber
Sets the value of the sequenceNumber on this builder to the given value.- Parameters:
sequenceNumber- the value sequenceNumber to set, must not be null or blank- Throws:
IllegalArgumentException- if the sequenceNumber is null, blank, or invalid
-
setProposition
Sets the value of the proposition on this builder to the given value.- Parameters:
proposition- the value proposition to set
-
setVersionNumber
Sets the value of the versionNumber on this builder to the given value.- Parameters:
versionNumber- the value versionNumber to set
-
getId
- Specified by:
getIdin interfaceorg.kuali.rice.core.api.mo.common.Identifiable
-
getPropId
Description copied from interface:PropositionParameterContractReturns the Id for the parent proposition.It is the Id of the parent proposition.
- Specified by:
getPropIdin interfacePropositionParameterContract- Returns:
- Id for parent parameter.
-
getValue
Description copied from interface:PropositionParameterContractReturns the value of the proposition parameterIt is the value of the parameter
- Specified by:
getValuein interfacePropositionParameterContract- Returns:
- value of the parameter
-
getTermValue
Description copied from interface:PropositionParameterContractReturns the term value of the proposition parameter if the proposition parameter is a term.It is the term value of the parameter
- Specified by:
getTermValuein interfacePropositionParameterContract- Returns:
- value of the term parameter
-
getParameterType
Description copied from interface:PropositionParameterContractReturns the type of the parameter. Proposition parameters are one of the following types: Constant Values: numbers, strings, dates, etc. Terms: data available in the execution environment or provided by a term resolver Functions: custom functions that resolve to a value, or standard operators (equals, greater than, less than, ...)It identified the type of the parameter.
- Specified by:
getParameterTypein interfacePropositionParameterContract- Returns:
- the parameter type code. Valid values are C, T, and F.
-
getSequenceNumber
Description copied from interface:PropositionParameterContractReturns the sequence number of the proposition parameter. Proposition parameters are listed in Reverse Polish Notation. The sequence number (starting with 1) identifies the position of the parameter in the list.- Specified by:
getSequenceNumberin interfacePropositionParameterContract- Returns:
- the sequence number of the proposition parameter
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceorg.kuali.rice.core.api.mo.common.Versioned
-
build
Builds an instance of a PropositionParameter based on the current state of the builder.- Specified by:
buildin interfaceorg.kuali.rice.core.api.mo.ModelBuilder- Returns:
- the fully-constructed PropositionParameter
-