Class FunctionParameterDefinition.Builder
java.lang.Object
org.kuali.rice.krms.api.repository.function.FunctionParameterDefinition.Builder
- All Implemented Interfaces:
Serializable,Identifiable,Versioned,ModelBuilder,FunctionParameterDefinitionContract
- Enclosing class:
FunctionParameterDefinition
public static final class FunctionParameterDefinition.Builder
extends Object
implements FunctionParameterDefinitionContract, ModelBuilder, Serializable
A builder which can be used to construct
FunctionParameterDefinition
instances. Enforces the constraints of the FunctionParameterDefinitionContract.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a function parameter definition builder with the given required values.create(FunctionParameterDefinitionContract contract) Creates and populates a builder with the data on the givenFunctionParameterDefinitionContract.Returns the description of this parameter.Returns the ID of the function to which this parameter is associated.getId()getName()Returns the name of this parameters.Returns the type of this function parameter.This is the sequence number of the function parameter.voidsetDescription(String description) Sets the description for the function parameter definition that will be returned by this builder.voidsetFunctionId(String functionId) Sets the type for the function id If provided, the function id must be non-blank.voidSets the id for the function parameter definition that will be returned by this builder.voidSets the name for the function parameter definition that will be returned by this builder.voidsetParameterType(String type) Sets the type for the function parameter definition that will be returned by this builder.voidsetSequenceNumber(Integer sequenceNumber) Sets the sequence number for the function parameter definition that will be returned by this builder.voidsetVersionNumber(Long versionNumber) Sets the version number for the function parameter definition that will be returned by this builder.
-
Method Details
-
create
public static FunctionParameterDefinition.Builder create(String name, String type, Integer sequenceNumber) Creates a function parameter definition builder with the given required values. This builder is the only means by which aFunctionParameterDefinitionobject should be created.- Parameters:
name- the name of the function parameter definition to create, must not be null or blanktype- the type of the function parameter definition to create, must not be null or blank- Returns:
- a builder with the required values already initialized
- Throws:
IllegalArgumentException- if any of the given arguments is null or blank
-
create
public static FunctionParameterDefinition.Builder create(FunctionParameterDefinitionContract contract) Creates and populates a builder with the data on the givenFunctionParameterDefinitionContract. This is similar in nature to a "copy constructor" forFunctionParameterDefinition.- Parameters:
contract- an object implementing theFunctionParameterDefinitionContractfrom which to copy property values- Returns:
- a builder with the values from the contract already initialized
- Throws:
IllegalArgumentException- if the given contract is null
-
build
- Specified by:
buildin interfaceModelBuilder
-
getId
- Specified by:
getIdin interfaceIdentifiable
-
setId
Sets the id for the function parameter definition that will be returned by this builder.- Parameters:
id- the function parameter definition id to set
-
getName
Description copied from interface:FunctionParameterDefinitionContractReturns the name of this parameters. All parameters have a name and this value can never be null or blank. The parameter name must be unique within a given function definition.- Specified by:
getNamein interfaceFunctionParameterDefinitionContract- Returns:
- the name of this function parameter definition
-
setName
Sets the name for the function parameter definition that will be returned by this builder. The name must not be null or blank.- Parameters:
name- the name to set on this builder, must not be null or blank
-
getDescription
Description copied from interface:FunctionParameterDefinitionContractReturns the description of this parameter. The description is intended to provide more information about a parameter and it's appropriate usage. The description is optional and will be null if a description is not defined.- Specified by:
getDescriptionin interfaceFunctionParameterDefinitionContract- Returns:
- the description of this function parameter definition, or null if this parameter has no description
-
setDescription
Sets the description for the function parameter definition that will be returned by this builder.- Parameters:
description- the description to set on this builder
-
getParameterType
Description copied from interface:FunctionParameterDefinitionContractReturns the type of this function parameter. This can be one of a set of "built-in" data types or a custom data type represented as a fully qualified java class name. All parameters must have a valid type so this method should never return null or blank.- Specified by:
getParameterTypein interfaceFunctionParameterDefinitionContract- Returns:
- the type of this function parameter definition
-
setParameterType
Sets the type for the function parameter definition that will be returned by this builder. This can be one of a set of "built-in" data types or a custom datatype represented as a fully qualified java class name. The type must not be null or blank.- Parameters:
type- the type to set on this builder, must not be null or blank
-
getFunctionId
Description copied from interface:FunctionParameterDefinitionContractReturns the ID of the function to which this parameter is associated.- Specified by:
getFunctionIdin interfaceFunctionParameterDefinitionContract- Returns:
- the ID of the corresponding function
-
setFunctionId
Sets the type for the function id If provided, the function id must be non-blank. Must allow id to be null, to prevent chicken/egg problems.- Parameters:
functionId- the functionId to set on this builder, must be either null or non-blank
-
getSequenceNumber
Description copied from interface:FunctionParameterDefinitionContractThis is the sequence number of the function parameter. The sequence number identifies the position of the parameter in the function list.- Specified by:
getSequenceNumberin interfaceFunctionParameterDefinitionContract- Returns:
- the sequence number of the function parameter
-
setSequenceNumber
Sets the sequence number for the function parameter definition that will be returned by this builder. This is the position in the functions parameter list.- Parameters:
sequenceNumber- the position of the parameter in the function parameter list
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceVersioned
-
setVersionNumber
Sets the version number for the function parameter definition that will be returned by this builder.In general, this value should not be manually set on the builder, but rather copied from an existing
FunctionParameterDefinitionContractwhen invokingcreate(FunctionParameterDefinitionContract).- Parameters:
versionNumber- the version number to set
-