A postal address stored against a Kademi account, made up of the usual two address lines, city, state, postcode and country. It implements the readable address interface, so an address can be copied wholesale from any other address-like object with copyFrom. Every field is free text and optional, which suits international addresses but means nothing is validated.
Group: Database Entities
Implements: Serializable, IReadableAddress, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| addressLine1 | String | First line of the street address, typically the building number and street. Free text and may be null. |
| addressLine2 | String | Second line of the street address, used for a suburb, unit or similar. Free text and often null. |
| addressState | String | The state, province or region of the address. Free text, so it holds whatever the entered country uses, and may be null. |
| adminOrg | Organisation | The Kademi account holder this address belongs to. |
| city | String | The city or town of the address. Free text and may be null. |
| country | String | The country of the address, held as free text rather than a validated country code. May be null. |
| id | long | The database identifier of this address. |
| modifiedBy | Profile | The profile that last changed this address. Set when the address is first created and expected to be kept current by whatever edits it. |
| modifiedDate | Date | When this address was last changed, as a timestamp. Set when the address is created and not updated automatically on later edits. |
| postcode | String | The postcode or zip code of the address, kept as free text so international formats are preserved exactly as entered. May be null. |
Methods
getId() · getAdminOrg() · setAdminOrg(Organisation adminOrg) · getAddressLine1() · setAddressLine1(String addressLine1) · getAddressLine2() · setAddressLine2(String addressLine2) · getCity() · setCity(String city) · getPostcode() · setPostcode(String postcode) · getAddressState() · setAddressState(String state) · getCountry() · setCountry(String country) · getModifiedBy() · setModifiedBy(Profile modifiedBy) · getModifiedDate() · setModifiedDate(Date modifiedDate) · copyFrom(IReadableAddress add)
getId()
Returns: long
The database identifier of this address.
getAdminOrg()
Returns: Organisation
The Kademi account holder this address belongs to.
setAdminOrg(Organisation adminOrg)
Returns: void
Sets the Kademi account holder this address belongs to.
| Parameter | Description |
|---|---|
adminOrg | the account that owns this address |
getAddressLine1()
Returns: String
First line of the street address, typically the building number and street. Free text and may be null.
setAddressLine1(String addressLine1)
Returns: void
Sets the first line of the street address.
| Parameter | Description |
|---|---|
addressLine1 | the first address line |
getAddressLine2()
Returns: String
Second line of the street address, used for a suburb, unit or similar. Free text and often null.
setAddressLine2(String addressLine2)
Returns: void
Sets the second line of the street address.
| Parameter | Description |
|---|---|
addressLine2 | the second address line |
getCity()
Returns: String
The city or town of the address. Free text and may be null.
setCity(String city)
Returns: void
Sets the city or town of the address.
| Parameter | Description |
|---|---|
city | the city or town |
getPostcode()
Returns: String
The postcode or zip code of the address, kept as free text so international formats are preserved exactly as entered. May be null.
setPostcode(String postcode)
Returns: void
Sets the postcode or zip code of the address.
| Parameter | Description |
|---|---|
postcode | the postcode |
getAddressState()
Returns: String
The state, province or region of the address. Free text, so it holds whatever the entered country uses, and may be null.
setAddressState(String state)
Returns: void
Sets the state, province or region of the address.
| Parameter | Description |
|---|---|
state | the state or region |
getCountry()
Returns: String
The country of the address, held as free text rather than a validated country code. May be null.
setCountry(String country)
Returns: void
Sets the country of the address.
| Parameter | Description |
|---|---|
country | the country |
getModifiedBy()
Returns: Profile
The profile that last changed this address. Set when the address is first created and expected to be kept current by whatever edits it.
setModifiedBy(Profile modifiedBy)
Returns: void
Sets the profile that last changed this address.
| Parameter | Description |
|---|---|
modifiedBy | the profile that last modified this address |
getModifiedDate()
Returns: Date
When this address was last changed, as a timestamp. Set when the address is created and not updated automatically on later edits.
setModifiedDate(Date modifiedDate)
Returns: void
Sets when this address was last changed.
| Parameter | Description |
|---|---|
modifiedDate | the date and time this address was last modified |
copyFrom(IReadableAddress add)
Returns: void
Copies the two address lines, state, city, country and postcode from another address into this one. The account, modified by and modified date are not touched, so those must be maintained separately.
| Parameter | Description |
|---|---|
add | the address to copy the location fields from |