|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.location.api.state.State.Builder
public static class State.Builder
This builder constructs a State enforcing the constraints of the StateContract
.
Method Summary | |
---|---|
State |
build()
Returns an instance of the object being built by this builder based on the current state of the builder. |
static State.Builder |
create(StateContract contract)
creates a Parameter from an existing StateContract . |
static State.Builder |
create(String code,
String name,
String countryCode)
creates a State with the required fields. |
String |
getCode()
The code value for this object. |
String |
getCountryCode()
This the postal country code for the State. |
String |
getName()
This the postal name for the State. |
Long |
getVersionNumber()
Returns the version number for this object. |
boolean |
isActive()
The active indicator for an object. |
void |
setActive(boolean active)
|
void |
setCode(String code)
Sets the code to be used for the State created from this Builder. |
void |
setCountryCode(String countryCode)
Sets the Country code to be associated with the State created from this Builder. |
void |
setName(String name)
Sets the full name of the State created from this Builder. |
void |
setVersionNumber(Long versionNumber)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static State.Builder create(String code, String name, String countryCode)
code
- represents code for the State being builtname
- represents full name for the State being builtcountryCode
- code for the Country this State is associated with
public static State.Builder create(StateContract contract)
StateContract
.
public String getCode()
Coded
getCode
in interface Coded
public void setCode(String code)
code
- String code for a State.
IllegalArgumentException
- if the passed in code is null or a blank String.public String getName()
StateContract
getName
in interface StateContract
public void setName(String name)
name
- String representing the full name for the State
IllegalArgumentException
- if the passed in name is null or a blank String.public String getCountryCode()
StateContract
getCountryCode
in interface StateContract
public void setCountryCode(String countryCode)
countryCode
- String representing the Country Code
IllegalArgumentException
- if the passed in countryCode is null or a blank String.public boolean isActive()
Inactivatable
isActive
in interface Inactivatable
public void setActive(boolean active)
public Long getVersionNumber()
Versioned
getVersionNumber
in interface Versioned
public void setVersionNumber(Long versionNumber)
public State build()
ModelBuilder
build
in interface ModelBuilder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |