Class County.Builder
java.lang.Object
org.kuali.rice.location.api.county.County.Builder
- All Implemented Interfaces:
Serializable,org.kuali.rice.core.api.mo.common.active.Inactivatable,org.kuali.rice.core.api.mo.common.Coded,org.kuali.rice.core.api.mo.common.Versioned,org.kuali.rice.core.api.mo.ModelBuilder,CountyContract
- Enclosing class:
County
public static class County.Builder
extends Object
implements CountyContract, org.kuali.rice.core.api.mo.ModelBuilder, Serializable
This builder constructs an County enforcing the constraints of the
CountyContract.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()static County.Buildercreates a County Builder with the required fields.static County.Buildercreate(CountyContract contract) creates a County Builder from an existingCountyContract.getCode()This the postal country code for the County.getName()This the name for the County.This the postal state code for the County.booleanisActive()voidsetActive(boolean active) Sets the active flag for the County created from this Builder.voidSets the code to be used for the County created from this Builder.voidsetCountryCode(String countryCode) Sets the Country code to be associated with the County created from this Builder.voidSets the full name of the County created from this Builder.voidsetStateCode(String stateCode) Sets the State code to be associated with the County created from this Builder.voidsetVersionNumber(Long versionNumber)
-
Method Details
-
create
creates a County Builder with the required fields. -
create
creates a County Builder from an existingCountyContract. -
getCode
- Specified by:
getCodein interfaceorg.kuali.rice.core.api.mo.common.Coded
-
setCode
Sets the code to be used for the County created from this Builder.- Parameters:
code- String code for a County- Throws:
IllegalArgumentException- if the passed in code is null or a blank String.
-
getName
Description copied from interface:CountyContractThis the name for the County. This cannot be null or a blank string.- Specified by:
getNamein interfaceCountyContract- Returns:
- name
-
setName
Sets the full name of the County created from this Builder.- Parameters:
name- String representing the full name for the County- Throws:
IllegalArgumentException- if the passed in name is null or a blank String.
-
getCountryCode
Description copied from interface:CountyContractThis the postal country code for the County. This cannot be null or a blank string.- Specified by:
getCountryCodein interfaceCountyContract- Returns:
- postal country code
-
setCountryCode
Sets the Country code to be associated with the County created from this Builder.- Parameters:
countryCode- String representing the Country Code- Throws:
IllegalArgumentException- if the passed in countryCode is null or a blank String.- See Also:
-
getStateCode
Description copied from interface:CountyContractThis the postal state code for the County. This cannot be null or a blank string.- Specified by:
getStateCodein interfaceCountyContract- Returns:
- postal state code
-
setStateCode
Sets the State code to be associated with the County created from this Builder.- Parameters:
stateCode- String representing the State code- Throws:
IllegalArgumentException- if the passed in statecode is null or a blank String.- See Also:
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceorg.kuali.rice.core.api.mo.common.active.Inactivatable
-
setActive
public void setActive(boolean active) Sets the active flag for the County created from this Builder.- Parameters:
active-
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceorg.kuali.rice.core.api.mo.common.Versioned
-
setVersionNumber
-
build
- Specified by:
buildin interfaceorg.kuali.rice.core.api.mo.ModelBuilder
-