org.kuali.rice.krms.api.repository.proposition
Class PropositionParameter.Builder

java.lang.Object
  extended by org.kuali.rice.krms.api.repository.proposition.PropositionParameter.Builder
All Implemented Interfaces:
Serializable, Identifiable, Versioned, ModelBuilder, PropositionParameterContract
Enclosing class:
PropositionParameter

public static class PropositionParameter.Builder
extends Object
implements PropositionParameterContract, ModelBuilder, Serializable

This builder is used to construct instances of PropositionParameter. It enforces the constraints of the PropositionParameterContract.

See Also:
Serialized Form

Method Summary
 PropositionParameter build()
          Builds an instance of a PropositionParameter based on the current state of the builder.
static PropositionParameter.Builder create(PropositionParameterContract contract)
          Creates a builder by populating it with data from the given PropositionParameterContract.
static PropositionParameter.Builder create(String id, String propId, String value, String parameterType, Integer sequenceNumber)
           
 String getId()
          The unique identifier for an object.
 String getParameterType()
          This is the type of the parameter.
 String getPropId()
          This is the Id for the parent proposition.
 Integer getSequenceNumber()
          This is the sequence number of the proposition parameter.
 String getValue()
          This is the value of the proposition parameter
 Long getVersionNumber()
          Returns the version number for this object.
 void setId(String id)
          Sets the value of the id on this builder to the given value.
 void setParameterType(String parameterType)
           
 void setPropId(String propId)
           
 void setProposition(PropositionDefinition.Builder proposition)
           
 void setSequenceNumber(Integer sequenceNumber)
           
 void setValue(String value)
           
 void setVersionNumber(Long versionNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static PropositionParameter.Builder create(String id,
                                                  String propId,
                                                  String value,
                                                  String parameterType,
                                                  Integer sequenceNumber)

create

public static PropositionParameter.Builder create(PropositionParameterContract contract)
Creates a builder by populating it with data from the given PropositionParameterContract.

Parameters:
contract - the contract from which to populate this builder
Returns:
an instance of the builder populated with data from the contract

setId

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

public void setPropId(String propId)

setValue

public void setValue(String value)

setParameterType

public void setParameterType(String parameterType)

setSequenceNumber

public void setSequenceNumber(Integer sequenceNumber)

setProposition

public void setProposition(PropositionDefinition.Builder proposition)

setVersionNumber

public void setVersionNumber(Long versionNumber)

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

getPropId

public String getPropId()
Description copied from interface: PropositionParameterContract
This is the Id for the parent proposition.

It is the Id of the parent proposition.

Specified by:
getPropId in interface PropositionParameterContract
Returns:
Id for parent parameter.

getValue

public String getValue()
Description copied from interface: PropositionParameterContract
This is the value of the proposition parameter

It is the value of the parameter

Specified by:
getValue in interface PropositionParameterContract
Returns:
value of the parameter

getParameterType

public String getParameterType()
Description copied from interface: PropositionParameterContract
This is 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:
getParameterType in interface PropositionParameterContract
Returns:
the parameter type code. Valid values are C, T, and F.

getSequenceNumber

public Integer getSequenceNumber()
Description copied from interface: PropositionParameterContract
This is 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:
getSequenceNumber in interface PropositionParameterContract
Returns:
the sequence number of the proposition parameter

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

build

public PropositionParameter build()
Builds an instance of a PropositionParameter based on the current state of the builder.

Specified by:
build in interface ModelBuilder
Returns:
the fully-constructed PropositionParameter


Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.