Class Country.Builder
java.lang.Object
org.kuali.rice.location.api.country.Country.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,CountryContract
- Enclosing class:
Country
public static class Country.Builder
extends Object
implements CountryContract, org.kuali.rice.core.api.mo.ModelBuilder, Serializable
Builder for immutable Country objects.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()static Country.Builderstatic Country.Builderstatic Country.Builderstatic Country.Buildercreate(String code, String alternatePostalCode, String name, String nameV3, boolean restricted, boolean active) static Country.BuilderAn alternative country code to represent a country.getCode()An abbreviated String representing the unique identifying code for a given country.getName()A full, familiar, name of a country.The name of a country according to CountryCodeDataTypeV3 in UniversalCodes-V2.0.xsdbooleanisActive()booleanValue representing whether a country is restricted.voidsetActive(boolean active) voidsetAlternateCode(String alternatePostalCode) voidvoidvoidvoidsetRestricted(boolean restricted) voidsetVersionNumber(Long versionNumber)
-
Method Details
-
create
-
create
-
create
public static Country.Builder create(String code, String alternatePostalCode, String name, boolean restricted, boolean active) -
create
public static Country.Builder create(String code, String alternatePostalCode, String name, String nameV3, boolean restricted, boolean active) -
create
-
build
- Specified by:
buildin interfaceorg.kuali.rice.core.api.mo.ModelBuilder
-
setCode
-
getCode
Description copied from interface:CountryContractAn abbreviated String representing the unique identifying code for a given country. This code correlates directly to the alpha-2 country codes from the ISO-3166-1-alpha-2 standard.This property is required to exist.
- Specified by:
getCodein interfaceorg.kuali.rice.core.api.mo.common.Coded- Specified by:
getCodein interfaceCountryContract
-
setAlternateCode
-
getAlternateCode
Description copied from interface:CountryContractAn alternative country code to represent a country. This code correlats directly to the alpha-3 codes from the ISO_3166-1-alpha-3 standard.This property is optional
- Specified by:
getAlternateCodein interfaceCountryContract- Returns:
- The alternate country code if it exists. null is returned if an alternate code does not exist.
-
setName
-
getName
Description copied from interface:CountryContractA full, familiar, name of a country.This property is optional
- Specified by:
getNamein interfaceCountryContract- Returns:
- The name of a country if it exists. null is returned if a full name does not exist.
-
setNameV3
-
getNameV3
Description copied from interface:CountryContractThe name of a country according to CountryCodeDataTypeV3 in UniversalCodes-V2.0.xsd- Specified by:
getNameV3in interfaceCountryContract
-
setActive
public void setActive(boolean active) -
isActive
public boolean isActive()- Specified by:
isActivein interfaceorg.kuali.rice.core.api.mo.common.active.Inactivatable
-
setVersionNumber
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceorg.kuali.rice.core.api.mo.common.Versioned
-
setRestricted
public void setRestricted(boolean restricted) -
isRestricted
public boolean isRestricted()Description copied from interface:CountryContractValue representing whether a country is restricted.The meaning of restricted for a country varies depending upon the implementer - for instance if a country may not be used in the address of a Vendor.
The default value of this property is false.
- Specified by:
isRestrictedin interfaceCountryContract- Returns:
- if a country is restricted.
-