|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PostalAddress
Represents a Postal Address; this class aims to be independent of how an address may be represented in an individual country; StateProvince, Country and City are represented as objects rather than Strings; refer to the package documentation for biz.janux.geography for more information on the relationship between City, StateProvince and Country
This interface also provides getCityAsString, getStateProvinceAsString, and getCountryAsString so that implementing classes can receive text values representing the geographical entities, for example from a UI form. These methods can also be used in cases where it is not possible or desirable to create the different geographical entitie. For example, it may be that the Country is entered by-hand, rather than through a pick list, and may contain a spelling other than the one that exists in the pre-populated Country tables. In such case, it would not be desireable to create a new Country entity for the different spellings, yet it is necessary to store whatever String was entered for the Country. In effect, via these methods it is possible to completely bypass the use of the Geographical entities, if in a given implementation it is desireable or necessary to store all address fields as text.
Finally, as a convenience feature, this interface provides the methods getCityName, getStateProvinceCode, getStateProvinceName, and getCountryName, which makes it possible to retrieve City, State, Country Strings without concern as to whether these are stored as entities or as simple Strings
Note that the plan is to eventually make the 'Name' fields of the different geographical entities localizable, For example, it may be necessary to display a City both as 'Munich' or 'Munchen', depending on the language of the site. Hence, rather than being a single-valued field, name fields will be maps of strings keyed by Language, Country, and Variant code, in the usual java way. We foresee that such future implementation will still provide the ability to only use a single language when desireable, and that the methods which do not specify a locale will be interpreted to be requesting the default locale.
Field Summary |
---|
Fields inherited from interface org.janux.bus.persistence.Persistent |
---|
UNSAVED_ID |
Method Summary | |
---|---|
City |
getCity()
The City where the PostalAddress is located; may be null if it is not possible to ascertain the City entity in with this Postal Address is located; in such case, the city may be stored as a String in getCityAsString. |
String |
getCityAsString()
|
String |
getCityName()
|
Country |
getCountry()
Country in which this PostalAddress is located; if getCity or getStateProvince fields are not null, this Country must be the same as the one in which the City and StateProvince are located |
String |
getCountryAsString()
|
String |
getCountryCode()
|
String |
getCountryName()
|
String |
getLine1()
|
String |
getLine2()
|
String |
getLine3()
|
String |
getPostalCode()
|
StateProvince |
getStateProvince()
StateProvince in which this PostalAddress is located; if getCity or getCountry fields ane not null, all three of these entities must be congruent. |
String |
getStateProvinceAsString()
|
String |
getStateProvinceCode()
|
String |
getStateProvinceName()
|
void |
setCity(City o)
|
void |
setCityAsString(String s)
|
void |
setCountry(Country o)
|
void |
setCountryAsString(String s)
|
void |
setLine1(String s)
|
void |
setLine2(String s)
|
void |
setLine3(String s)
|
void |
setPostalCode(String s)
|
void |
setStateProvince(StateProvince o)
|
void |
setStateProvinceAsString(String s)
|
Methods inherited from interface biz.janux.people.ContactMethod |
---|
clone |
Methods inherited from interface org.janux.bus.persistence.Persistent |
---|
getId, setId |
Method Detail |
---|
String getLine1()
void setLine1(String s)
String getLine2()
void setLine2(String s)
String getLine3()
void setLine3(String s)
City getCity()
void setCity(City o)
StateProvince getStateProvince()
void setStateProvince(StateProvince o)
String getPostalCode()
void setPostalCode(String s)
Country getCountry()
void setCountry(Country o)
String getCityName()
String getStateProvinceName()
String getStateProvinceCode()
String getCountryName()
String getCountryCode()
String getCityAsString()
void setCityAsString(String s)
s
- a String that can be used to represent a cityString getStateProvinceAsString()
void setStateProvinceAsString(String s)
s
- a String that can be used to represent a state or a provinceString getCountryAsString()
void setCountryAsString(String s)
s
- a String that can be used to represent a country
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |