org.kuali.rice.core.api.parameter
Class Parameter.Builder

java.lang.Object
  extended by org.kuali.rice.core.api.parameter.Parameter.Builder
All Implemented Interfaces:
Serializable, GloballyUnique, Versioned, ModelBuilder, ParameterContract
Enclosing class:
Parameter

public static final class Parameter.Builder
extends Object
implements ParameterContract, ModelBuilder, Serializable

This builder constructs an Parameter enforcing the constraints of the ParameterContract.

See Also:
Serialized Form

Method Summary
 Parameter build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static Parameter.Builder create(ParameterContract contract)
          creates a Parameter from an existing ParameterContract.
static Parameter.Builder create(String applicationId, String namespaceCode, String componentCode, String name, ParameterType.Builder parameterType)
          creates a Parameter with the required fields.
 String getApplicationId()
          This is the application id for the Parameter.
 String getComponentCode()
          This is the component code for the parameter.
 String getDescription()
          This is the description for what the parameter is used for.
 EvaluationOperator getEvaluationOperator()
          This is the evaluation operator for the parameter.
 String getName()
          The name of the parameter.
 String getNamespaceCode()
          This is the namespace for the parameter.
 String getObjectId()
          Return the globally unique object id of this object.
 ParameterType.Builder getParameterType()
          This is the type for the parameter.
 String getValue()
          The value of the parameter.
 Long getVersionNumber()
          Returns the version number for this object.
 void setApplicationId(String applicationId)
           
 void setComponentCode(String componentCode)
           
 void setDescription(String description)
           
 void setEvaluationOperator(EvaluationOperator evaluationOperator)
           
 void setName(String name)
           
 void setNamespaceCode(String namespaceCode)
           
 void setObjectId(String objectId)
           
 void setParameterType(ParameterType.Builder parameterType)
           
 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 Parameter.Builder create(String applicationId,
                                       String namespaceCode,
                                       String componentCode,
                                       String name,
                                       ParameterType.Builder parameterType)
creates a Parameter with the required fields.


create

public static Parameter.Builder create(ParameterContract contract)
creates a Parameter from an existing ParameterContract.


setApplicationId

public void setApplicationId(String applicationId)

setNamespaceCode

public void setNamespaceCode(String namespaceCode)

setComponentCode

public void setComponentCode(String componentCode)

setName

public void setName(String name)

setParameterType

public void setParameterType(ParameterType.Builder parameterType)

setValue

public void setValue(String value)

setDescription

public void setDescription(String description)

setEvaluationOperator

public void setEvaluationOperator(EvaluationOperator evaluationOperator)

setVersionNumber

public void setVersionNumber(Long versionNumber)

setObjectId

public void setObjectId(String objectId)

getApplicationId

public String getApplicationId()
Description copied from interface: ParameterContract
This is the application id for the Parameter. This cannot be null or a blank string.

It is a way of assigning the Parameter to a specific rice application or rice ecosystem.

Specified by:
getApplicationId in interface ParameterContract
Returns:
application id

getNamespaceCode

public String getNamespaceCode()
Description copied from interface: ParameterContract
This is the namespace for the parameter. This cannot be null or a blank string.

It is a way of assigning the parameter to a logical grouping within a rice application or rice ecosystem.

Specified by:
getNamespaceCode in interface ParameterContract
Returns:
namespace code

getComponentCode

public String getComponentCode()
Description copied from interface: ParameterContract
This is the component code for the parameter. This cannot be null.

It is a way of assigning a parameter to a functional component within a rice application or rice ecosystem.

Specified by:
getComponentCode in interface ParameterContract
Returns:
component

getName

public String getName()
Description copied from interface: ParameterContract
The name of the parameter. This cannot be null or a blank string.

Specified by:
getName in interface ParameterContract
Returns:
name

getValue

public String getValue()
Description copied from interface: ParameterContract
The value of the parameter. This can be null or a blank string.

Specified by:
getValue in interface ParameterContract
Returns:
value

getDescription

public String getDescription()
Description copied from interface: ParameterContract
This is the description for what the parameter is used for. This can be null or a blank string.

Specified by:
getDescription in interface ParameterContract
Returns:
description

getEvaluationOperator

public EvaluationOperator getEvaluationOperator()
Description copied from interface: ParameterContract
This is the evaluation operator for the parameter. This can be null.

This allows parameters to be used as primitive business rules.

Specified by:
getEvaluationOperator in interface ParameterContract
Returns:
evaluation operator

build

public Parameter build()
Description copied from interface: ModelBuilder
Returns an instance of the object being built by this builder based on the current state of the builder. It should be possible to invoke this method more than once on the same builder. It should never return null;

Specified by:
build in interface ModelBuilder
Returns:
an instance of the object being built by this builder, should never return null

getParameterType

public ParameterType.Builder getParameterType()
Description copied from interface: ParameterContract
This is the type for the parameter. This cannot be null.

Some parameters have special types in rice which may have special meaning and is related to the ParameterContract.getEvaluationOperator()

Specified by:
getParameterType in interface ParameterContract
Returns:
type

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

getObjectId

public String getObjectId()
Description copied from interface: GloballyUnique
Return the globally unique object id of this object. In general, this value should only be null if the object has not yet been stored to a persistent data store.

Specified by:
getObjectId in interface GloballyUnique
Returns:
the objectId of this object, or null if it has not been set yet


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