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 Details

    • create

      public static CampusType.Builder create(String code)
      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

      public static CampusType.Builder create(CampusTypeContract contract)
      Creates a builder by populating it with data from the given CampusTypeContract.
      Parameters:
      contract - the contract from which to populate this builder
      Returns:
      an instance of the builder populated with data from the contract
    • setCode

      public void setCode(String code)
      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

      public void setName(String name)
    • setActive

      public void setActive(boolean active)
    • setVersionNumber

      public void setVersionNumber(Long versionNumber)
    • setObjectId

      public void setObjectId(String objectId)
    • getCode

      public String getCode()
      Specified by:
      getCode in interface Coded
    • getName

      public String getName()
      Description copied from interface: CampusTypeContract
      This is the name for the CampusType.

      It is a name a campus type.

      Specified by:
      getName in interface CampusTypeContract
      Returns:
      name for CampusType.
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface Inactivatable
    • getVersionNumber

      public Long getVersionNumber()
      Specified by:
      getVersionNumber in interface Versioned
    • getObjectId

      public String getObjectId()
      Specified by:
      getObjectId in interface GloballyUnique
    • build

      public CampusType build()
      Builds an instance of a CampusType based on the current state of the builder.
      Specified by:
      build in interface ModelBuilder
      Returns:
      the fully-constructed CampusType