org.kuali.rice.location.api.campus
Class Campus.Builder

java.lang.Object
  extended by 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:
Serialized Form

Method Summary
 Campus build()
          Builds an instance of a Campus based on the current state of the builder.
static Campus.Builder create(CampusContract contract)
          Creates a builder by populating it with data from the given CampusContract.
static Campus.Builder create(String code)
          Creates a builder from the given campus code.
 CampusType.Builder getCampusType()
          This is the campus type for the Campus.
 String getCode()
          The code value for this object.
 String getName()
          This is the name for the Campus.
 String getObjectId()
          Return the globally unique object id of this object.
 String getShortName()
          This is the short name for the Campus.
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean active)
           
 void setCampusType(CampusType.Builder campusType)
           
 void setCode(String code)
          Sets the value of the code on this builder to the given value.
 void setName(String name)
           
 void setObjectId(String objectId)
           
 void setShortName(String shortName)
           
 void setVersionNumber(Long versionNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

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

public static Campus.Builder create(CampusContract contract)
Creates a builder by populating it with data from the given CampusContract.

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)

setShortName

public void setShortName(String shortName)

setCampusType

public void setCampusType(CampusType.Builder campusType)

setActive

public void setActive(boolean active)

setVersionNumber

public void setVersionNumber(Long versionNumber)

setObjectId

public void setObjectId(String objectId)

getCode

public String getCode()
Description copied from interface: Coded
The code value for this object. In general a code value cannot be null or a blank string.

Specified by:
getCode in interface Coded
Returns:
the code value for this object.

getName

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

It is a name a campus.

Specified by:
getName in interface CampusContract
Returns:
name for Campus.

getShortName

public String getShortName()
Description copied from interface: CampusContract
This is the short name for the Campus.

It is a shorter name for a campus.

Specified by:
getShortName in interface CampusContract
Returns:
short name for Campus.

getCampusType

public CampusType.Builder getCampusType()
Description copied from interface: CampusContract
This is the campus type for the Campus.

It is a object that defines the type of a campus.

Specified by:
getCampusType in interface CampusContract
Returns:
short name for Campus.

isActive

public boolean isActive()
Description copied from interface: Inactivatable
The active indicator for an object.

Specified by:
isActive in interface Inactivatable
Returns:
true if active false if not.

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

getObjectId

public String getObjectId()
Description copied from interface: GloballyUnique
Return the globally unique object id of this object. In general, this value should only be null if the object has not yet been stored to a persistent data store.

Specified by:
getObjectId in interface GloballyUnique
Returns:
the objectId of this object, or null if it has not been set yet

build

public Campus build()
Builds an instance of a Campus based on the current state of the builder.

Specified by:
build in interface ModelBuilder
Returns:
the fully-constructed Campus


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.