org.kuali.rice.krms.api.repository.term
Class TermParameterDefinition.Builder

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

public static class TermParameterDefinition.Builder
extends Object
implements TermParameterDefinitionContract, ModelBuilder, Serializable

See Also:
Serialized Form

Field Summary
static BuilderUtils.Transformer<TermParameterDefinitionContract,TermParameterDefinition.Builder> toBuilder
           
 
Method Summary
 TermParameterDefinition build()
          return a TermParameterDefinition instance constructed from this TermParameterDefinition.Builder
static TermParameterDefinition.Builder create(String id, String termId, String name, String value)
          static factory to create a TermParameterDefinition.Builder from fields
static TermParameterDefinition.Builder create(TermParameterDefinitionContract termParameterDefinition)
          static factory to create a TermParameterDefinition.Builder from a TermParameterDefinitionContract
 String getId()
          The unique identifier for an object.
 String getName()
          Gets the name of this parameter.
 String getTermId()
          Gets the identifier for the term that this parameter belongs to.
 String getValue()
          Gets the value of this parameter.
 Long getVersionNumber()
          Returns the version number for this object.
 void setId(String id)
           
 void setName(String name)
           
 void setTermId(String termId)
           
 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
 

Field Detail

toBuilder

public static final BuilderUtils.Transformer<TermParameterDefinitionContract,TermParameterDefinition.Builder> toBuilder
Method Detail

create

public static TermParameterDefinition.Builder create(String id,
                                                     String termId,
                                                     String name,
                                                     String value)
static factory to create a TermParameterDefinition.Builder from fields

Parameters:
id - must be null, or contain non-whitespace
termId - must be null, or contain non-whitespace
name - must be non-null
value -

create

public static TermParameterDefinition.Builder create(TermParameterDefinitionContract termParameterDefinition)
static factory to create a TermParameterDefinition.Builder from a TermParameterDefinitionContract

Parameters:
termParameterDefinition -

setId

public void setId(String id)
Parameters:
id - the id to set. for TermParameterDefinitions used in creational service methods, it must be null. Otherwise, it must be non-null and contain non-whitespace chars.
Throws:
IllegalArgumentException - if id is all whitespace chars

setTermId

public void setTermId(String termId)
Parameters:
termId - the termId to set

setName

public void setName(String name)
Parameters:
name - the name to set. Must be non-null and contain non-whitespace chars.
Throws:
IllegalArgumentException - if name is null or is all whitespace chars

setValue

public void setValue(String value)
Parameters:
value - the value to set. May be null or empty.

setVersionNumber

public void setVersionNumber(Long versionNumber)
Parameters:
versionNumber - the versionNumber to set. May be null.

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

getTermId

public String getTermId()
Description copied from interface: TermParameterDefinitionContract
Gets the identifier for the term that this parameter belongs to. May be null, must not be empty.

Specified by:
getTermId in interface TermParameterDefinitionContract
Returns:
the termId

getName

public String getName()
Description copied from interface: TermParameterDefinitionContract
Gets the name of this parameter. Must not be null or empty.

Specified by:
getName in interface TermParameterDefinitionContract
Returns:
the name

getValue

public String getValue()
Description copied from interface: TermParameterDefinitionContract
Gets the value of this parameter. May be null.

Specified by:
getValue in interface TermParameterDefinitionContract
Returns:
the value

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

build

public TermParameterDefinition build()
return a TermParameterDefinition instance constructed from this TermParameterDefinition.Builder

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


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