Class County.Builder

java.lang.Object
org.kuali.rice.location.api.county.County.Builder
All Implemented Interfaces:
Serializable, Inactivatable, Coded, Versioned, ModelBuilder, CountyContract
Enclosing class:
County

public static class County.Builder extends Object implements CountyContract, ModelBuilder, Serializable
This builder constructs an County enforcing the constraints of the CountyContract.
See Also:
  • Method Details

    • create

      public static County.Builder create(String code, String name, String countryCode, String stateCode)
      creates a County Builder with the required fields.
    • create

      public static County.Builder create(CountyContract contract)
      creates a County Builder from an existing CountyContract.
    • getCode

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

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

      public String getName()
      Description copied from interface: CountyContract
      This the name for the County. This cannot be null or a blank string.
      Specified by:
      getName in interface CountyContract
      Returns:
      name
    • setName

      public void setName(String name)
      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

      public String getCountryCode()
      Description copied from interface: CountyContract
      This the postal country code for the County. This cannot be null or a blank string.
      Specified by:
      getCountryCode in interface CountyContract
      Returns:
      postal country code
    • setCountryCode

      public void setCountryCode(String countryCode)
      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

      public String getStateCode()
      Description copied from interface: CountyContract
      This the postal state code for the County. This cannot be null or a blank string.
      Specified by:
      getStateCode in interface CountyContract
      Returns:
      postal state code
    • setStateCode

      public void setStateCode(String stateCode)
      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:
      isActive in interface Inactivatable
    • setActive

      public void setActive(boolean active)
      Sets the active flag for the County created from this Builder.
      Parameters:
      active -
    • getVersionNumber

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

      public void setVersionNumber(Long versionNumber)
    • build

      public County build()
      Specified by:
      build in interface ModelBuilder