|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.location.api.country.Country.Builder
public static class Country.Builder
Builder for immutable Country objects.
Method Summary | |
---|---|
Country |
build()
Returns an instance of the object being built by this builder based on the current state of the builder. |
static Country.Builder |
create(CountryContract cc)
|
static Country.Builder |
create(String code,
String name)
|
static Country.Builder |
create(String code,
String alternatePostalCode,
String name,
boolean restricted,
boolean active)
|
String |
getAlternateCode()
An alternative country code to represent a country. |
String |
getCode()
The code value for this object. |
String |
getName()
A full, familiar, name of a country. |
Long |
getVersionNumber()
Returns the version number for this object. |
boolean |
isActive()
The active indicator for an object. |
boolean |
isRestricted()
Value representing whether a country is restricted. |
void |
setActive(boolean active)
Sets the active property. |
void |
setAlternateCode(String alternatePostalCode)
Sets the optional alternatePostalCode property |
void |
setCode(String code)
Sets code property. |
void |
setName(String name)
Sets the optional name property. |
void |
setRestricted(boolean restricted)
Sets the restrictedProperty |
void |
setVersionNumber(Long versionNumber)
Sets the versionNumber property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Country.Builder create(String code, String name)
public static Country.Builder create(String code, String alternatePostalCode, String name, boolean restricted, boolean active)
public static Country.Builder create(CountryContract cc)
public Country build()
ModelBuilder
build
in interface ModelBuilder
public void setCode(String code)
code
- required to be not null and not empty.public String getCode()
CountryContract
This property is required to exist.
getCode
in interface Coded
getCode
in interface CountryContract
public void setAlternateCode(String alternatePostalCode)
alternatePostalCode
- public String getAlternateCode()
CountryContract
This property is optional
getAlternateCode
in interface CountryContract
public void setName(String name)
name
- public String getName()
CountryContract
This property is optional
getName
in interface CountryContract
public void setActive(boolean active)
active
- public boolean isActive()
Inactivatable
isActive
in interface Inactivatable
public void setVersionNumber(Long versionNumber)
versionNumber
- public Long getVersionNumber()
Versioned
getVersionNumber
in interface Versioned
public void setRestricted(boolean restricted)
restricted
- public boolean isRestricted()
CountryContract
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.
isRestricted
in interface CountryContract
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |