Class Campus.Builder
java.lang.Object
org.kuali.rice.location.api.campus.Campus.Builder
- All Implemented Interfaces:
Serializable,Inactivatable,Coded,GloballyUnique,Versioned,ModelBuilder,CampusContract
- Enclosing class:
Campus
public static class Campus.Builder
extends Object
implements CampusContract, ModelBuilder, Serializable
This builder is used to construct instances of Campus. It enforces the constraints of the
CampusContract.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance of a Campus based on the current state of the builder.static Campus.BuilderCreates a builder from the given campus code.static Campus.Buildercreate(CampusContract contract) Creates a builder by populating it with data from the givenCampusContract.This is the campus type for the Campus.getCode()getName()This is the name for the Campus.This is the short name for the Campus.booleanisActive()voidsetActive(boolean active) voidsetCampusType(CampusType.Builder campusType) voidSets the value of the code on this builder to the given value.voidvoidsetObjectId(String objectId) voidsetShortName(String shortName) voidsetVersionNumber(Long versionNumber)
-
Method Details
-
create
Creates a builder from the given campus code.- Parameters:
code- the campus 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 givenCampusContract.- 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
-
setShortName
-
setCampusType
-
setActive
public void setActive(boolean active) -
setVersionNumber
-
setObjectId
-
getCode
-
getName
Description copied from interface:CampusContractThis is the name for the Campus.It is a name a campus.
- Specified by:
getNamein interfaceCampusContract- Returns:
- name for Campus.
-
getShortName
Description copied from interface:CampusContractThis is the short name for the Campus.It is a shorter name for a campus.
- Specified by:
getShortNamein interfaceCampusContract- Returns:
- short name for Campus.
-
getCampusType
Description copied from interface:CampusContractThis is the campus type for the Campus.It is a object that defines the type of a campus.
- Specified by:
getCampusTypein interfaceCampusContract- Returns:
- short name for Campus.
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceInactivatable
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceVersioned
-
getObjectId
- Specified by:
getObjectIdin interfaceGloballyUnique
-
build
Builds an instance of a Campus based on the current state of the builder.- Specified by:
buildin interfaceModelBuilder- Returns:
- the fully-constructed Campus
-