Class CampusType.Builder
java.lang.Object
org.kuali.rice.location.api.campus.CampusType.Builder
- All Implemented Interfaces:
Serializable,Inactivatable,Coded,GloballyUnique,Versioned,ModelBuilder,CampusTypeContract
- Enclosing class:
CampusType
public static class CampusType.Builder
extends Object
implements CampusTypeContract, ModelBuilder, Serializable
This builder is used to construct instances of CampusType. It enforces the constraints of the
CampusTypeContract.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance of a CampusType based on the current state of the builder.static CampusType.BuilderCreates a builder from the given campus type code.static CampusType.Buildercreate(CampusTypeContract contract) Creates a builder by populating it with data from the givenCampusTypeContract.getCode()getName()This is the name for the CampusType.booleanisActive()voidsetActive(boolean active) voidSets the value of the code on this builder to the given value.voidvoidsetObjectId(String objectId) voidsetVersionNumber(Long versionNumber)
-
Method Details
-
create
Creates a builder from the given campus type code.- Parameters:
code- the campus type code- Returns:
- an instance of the builder with the code already populated
- Throws:
IllegalArgumentException- if the code is null or blank
-
create
Creates a builder by populating it with data from the givenCampusTypeContract.- Parameters:
contract- the contract from which to populate this builder- Returns:
- an instance of the builder populated with data from the contract
-
setCode
Sets the value of the code on this builder to the given value.- Parameters:
code- the code value to set, must not be null or blank- Throws:
IllegalArgumentException- if the code is null or blank
-
setName
-
setActive
public void setActive(boolean active) -
setVersionNumber
-
setObjectId
-
getCode
-
getName
Description copied from interface:CampusTypeContractThis is the name for the CampusType.It is a name a campus type.
- Specified by:
getNamein interfaceCampusTypeContract- Returns:
- name for CampusType.
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceInactivatable
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceVersioned
-
getObjectId
- Specified by:
getObjectIdin interfaceGloballyUnique
-
build
Builds an instance of a CampusType based on the current state of the builder.- Specified by:
buildin interfaceModelBuilder- Returns:
- the fully-constructed CampusType
-