public static class TermDefinition.Builder extends Object implements TermDefinitionContract, ModelBuilder, Serializable
ModelBuilder
for TermDefinition
s.public static TermDefinition.Builder create(String id, TermSpecificationDefinition.Builder termSpecification, List<TermParameterDefinition.Builder> termParameters)
TermDefinition.Builder
.id
- may be null.termSpecification
- must not be null.termParameters
- may be null.public static TermDefinition.Builder create(TermDefinitionContract term)
TermDefinition.Builder
from a TermDefinitionContract
.term
- must be non-null.public void setDescription(String description)
public void setId(String id)
id
- the id to set. Should be null to build TermDefinition
s for creation operations.IllegalArgumentException
- if the id is non-null and only contains whitespacepublic void setSpecification(TermSpecificationDefinition.Builder termSpecification)
termSpecification
- the termSpecification to setIllegalArgumentException
- if termSpecification is nullpublic void setParameters(List<TermParameterDefinition.Builder> parameters)
parameters
- the termParameters to set. May be null, or empty.public void setVersionNumber(Long versionNumber)
versionNumber
- the versionNumber to set. May be null.public String getId()
Identifiable
getId
in interface Identifiable
public TermSpecificationDefinition.Builder getSpecification()
TermDefinitionContract
TermSpecificationDefinitionContract
which specifies some important details about
the term. Will not be null.getSpecification
in interface TermDefinitionContract
public String getDescription()
TermDefinitionContract
TermDefinitionContract
. May be null.getDescription
in interface TermDefinitionContract
public List<TermParameterDefinition.Builder> getParameters()
TermDefinitionContract
TermDefinitionContract
. May be empty, but never null.getParameters
in interface TermDefinitionContract
public Long getVersionNumber()
Versioned
getVersionNumber
in interface Versioned
public TermDefinition build()
TermDefinition
, or dies trying.build
in interface ModelBuilder
IllegalStateException
- if builder validation failsModelBuilder.build()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.