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 Details

    • create

      public static Country.Builder create(String code, String name)
    • create

      public static Country.Builder create(String code, String name, String nameV3)
    • 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

      public static Country.Builder create(CountryContract cc)
    • build

      public Country build()
      Specified by:
      build in interface org.kuali.rice.core.api.mo.ModelBuilder
    • setCode

      public void setCode(String code)
    • getCode

      public String getCode()
      Description copied from interface: CountryContract
      An 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:
      getCode in interface org.kuali.rice.core.api.mo.common.Coded
      Specified by:
      getCode in interface CountryContract
    • setAlternateCode

      public void setAlternateCode(String alternatePostalCode)
    • getAlternateCode

      public String getAlternateCode()
      Description copied from interface: CountryContract
      An 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:
      getAlternateCode in interface CountryContract
      Returns:
      The alternate country code if it exists. null is returned if an alternate code does not exist.
    • setName

      public void setName(String name)
    • getName

      public String getName()
      Description copied from interface: CountryContract
      A full, familiar, name of a country.

      This property is optional

      Specified by:
      getName in interface CountryContract
      Returns:
      The name of a country if it exists. null is returned if a full name does not exist.
    • setNameV3

      public void setNameV3(String nameV3)
    • getNameV3

      public String getNameV3()
      Description copied from interface: CountryContract
      The name of a country according to CountryCodeDataTypeV3 in UniversalCodes-V2.0.xsd
      Specified by:
      getNameV3 in interface CountryContract
    • setActive

      public void setActive(boolean active)
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface org.kuali.rice.core.api.mo.common.active.Inactivatable
    • setVersionNumber

      public void setVersionNumber(Long versionNumber)
    • getVersionNumber

      public Long getVersionNumber()
      Specified by:
      getVersionNumber in interface org.kuali.rice.core.api.mo.common.Versioned
    • setRestricted

      public void setRestricted(boolean restricted)
    • isRestricted

      public boolean isRestricted()
      Description copied from interface: CountryContract
      Value 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:
      isRestricted in interface CountryContract
      Returns:
      if a country is restricted.