|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.shareddata.api.country.Country.Builder
public static class Country.Builder
Builder for immutable Country objects.
Field Summary | |
---|---|
private boolean |
active
|
private String |
alternateCode
|
private String |
code
|
private String |
name
|
private boolean |
restricted
|
private static long |
serialVersionUID
|
private Long |
versionNumber
|
Constructor Summary | |
---|---|
private |
Country.Builder(String code,
String alternateCode,
String name,
boolean restricted,
boolean active)
|
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()
An abbreviated String representing the unique identifying code for a given country. |
String |
getName()
A full, familiar, name of a country. |
Long |
getVersionNumber()
Returns the version number for this object. |
boolean |
isActive()
Returns a boolean value determining if the Object is Active or not. |
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 |
Field Detail |
---|
private static final long serialVersionUID
private String code
private String alternateCode
private String name
private boolean restricted
private boolean active
private Long versionNumber
Constructor Detail |
---|
private Country.Builder(String code, String alternateCode, String name, boolean restricted, boolean active)
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 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 |