Class TermSpecificationDefinition.Builder
java.lang.Object
org.kuali.rice.krms.api.repository.term.TermSpecificationDefinition.Builder
- All Implemented Interfaces:
Serializable,org.kuali.rice.core.api.mo.common.active.Inactivatable,org.kuali.rice.core.api.mo.common.Identifiable,org.kuali.rice.core.api.mo.common.Versioned,org.kuali.rice.core.api.mo.ModelBuilder,TermSpecificationDefinitionContract
- Enclosing class:
TermSpecificationDefinition
public static class TermSpecificationDefinition.Builder
extends Object
implements TermSpecificationDefinitionContract, org.kuali.rice.core.api.mo.ModelBuilder, Serializable
Builder for the
TermSpecificationDefinition immutable DTO. Instantiate using static factory method(s).- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderUtils.Transformer<TermSpecificationDefinitionContract, TermSpecificationDefinition.Builder> BuilderUtils.Transformerto ease converting lists to Builder types -
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs aTermSpecificationDefinitionstatic factory for aTermSpecificationDefinition.Builderfrom a complete set of field values for this object.create(TermSpecificationDefinitionContract termSpecification) static factory for aTermSpecificationDefinition.Builderfrom aTermSpecificationDefinitionContract.Gets an ordered list of the categories which this term specification definition belongs to.Gets a list of the IDs for the contexts this TermSpecification can be used in.Gets the description for this term specification, which will typically be a suitable description for any term having this specification as well.getId()getName()Gets the name for thisTermSpecificationDefinitionContract.Gets the namespace of thisTermSpecificationDefinitionContract.getType()Gets the fully qualified class name for the values of any term having this specification.booleanisActive()voidsetActive(boolean active) voidsetCategories(List<CategoryDefinition.Builder> categories) voidsetContextIds(List<String> contextIds) voidsetDescription(String description) voidvoidvoidsetNamespace(String namespace) voidvoidsetVersionNumber(Long versionNumber)
-
Field Details
-
toBuilder
public static final BuilderUtils.Transformer<TermSpecificationDefinitionContract,TermSpecificationDefinition.Builder> toBuilderBuilderUtils.Transformerto ease converting lists to Builder types
-
-
Method Details
-
create
public static TermSpecificationDefinition.Builder create(String termSpecificationId, String name, String namespace, String type) static factory for aTermSpecificationDefinition.Builderfrom a complete set of field values for this object.- Parameters:
termSpecificationId- the primary key field. Must be null for service methods that createTermSpecificationDefinitionContracts, and must be non-null invalid input: '&' contain non-whitespace chars otherwise.name- the name for theTermSpecificationDefinition. Must be non-null;.namespace- the namespace for theTermSpecificationDefinition. Must be non-null invalid input: '&' contain non-whitespace.type- the type for theTermSpecificationDefinition@return aTermSpecificationDefinition.Builderobject- Throws:
IllegalArgumentException- if invalid parameters are supplied.
-
create
public static TermSpecificationDefinition.Builder create(TermSpecificationDefinitionContract termSpecification) static factory for aTermSpecificationDefinition.Builderfrom aTermSpecificationDefinitionContract.- Parameters:
termSpecification- may not be null;- Throws:
IllegalArgumentException- if termSpecification is null, or violates the field invariants of theTermSpecificationDefinition.Builder.
-
setDescription
-
setId
- Parameters:
termSpecificationId- the key for thisTermSpecificationDefinition. Must be null for service methods that createTermSpecificationDefinitionContracts, and otherwise must be non-null invalid input: '&' contain non-whitespace chars.
-
setNamespace
- Parameters:
namespace- the namespace to set. Must be non-null and contain non-whitespace chars;
-
setName
- Parameters:
name- the name to set. Must be non-null and contain non-whitespace chars;
-
setType
- Parameters:
type- the type to set. Must be non-null and contain non-whitespace chars;
-
setVersionNumber
- Parameters:
versionNumber- the versionNumber to set. May be null.
-
setActive
public void setActive(boolean active) -
setCategories
- Parameters:
categories- the categories to set. May not be null but can be an empty set.
-
setContextIds
- Parameters:
contextIds- the contextIds to set. May not be null but may be empty.
-
getId
- Specified by:
getIdin interfaceorg.kuali.rice.core.api.mo.common.Identifiable- Returns:
- the termSpecificationId
-
getNamespace
Description copied from interface:TermSpecificationDefinitionContractGets the namespace of thisTermSpecificationDefinitionContract. Will not be null or empty.- Specified by:
getNamespacein interfaceTermSpecificationDefinitionContract- Returns:
- the namespace
-
getName
Description copied from interface:TermSpecificationDefinitionContractGets the name for thisTermSpecificationDefinitionContract. This is an important key that must be unique within a namespace, and is used to determine how to resolve any terms having this specification. Will not be null or empty.- Specified by:
getNamein interfaceTermSpecificationDefinitionContract- Returns:
- the name
-
getType
Description copied from interface:TermSpecificationDefinitionContractGets the fully qualified class name for the values of any term having this specification. E.g. if the type of the fact values for the "total dollar amount of a grant" term wasBigDecimal, then the term specification's type would be the String "java.math.BigDecimal". Will never return null or the empty string.- Specified by:
getTypein interfaceTermSpecificationDefinitionContract- Returns:
- the type
-
getDescription
Description copied from interface:TermSpecificationDefinitionContractGets the description for this term specification, which will typically be a suitable description for any term having this specification as well. May return null if no description is specified for the term specification.- Specified by:
getDescriptionin interfaceTermSpecificationDefinitionContract- Returns:
- the description for this term specification.
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceorg.kuali.rice.core.api.mo.common.Versioned- Returns:
- the version number
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceorg.kuali.rice.core.api.mo.common.active.Inactivatable
-
getCategories
Description copied from interface:TermSpecificationDefinitionContractGets an ordered list of the categories which this term specification definition belongs to. This list can be empty but will never be null.- Specified by:
getCategoriesin interfaceTermSpecificationDefinitionContract- Returns:
- the categories
-
getContextIds
Description copied from interface:TermSpecificationDefinitionContractGets a list of the IDs for the contexts this TermSpecification can be used in.- Specified by:
getContextIdsin interfaceTermSpecificationDefinitionContract- Returns:
- the list of contexts for this term specification definition
-
build
Constructs aTermSpecificationDefinition- Specified by:
buildin interfaceorg.kuali.rice.core.api.mo.ModelBuilder- See Also:
-