com.konakart.app
Class Address

java.lang.Object
  extended by com.konakart.app.Address
All Implemented Interfaces:
AddressIf

public class Address
extends java.lang.Object
implements AddressIf

Address


Constructor Summary
Address()
          Constructor
Address(com.workingdogs.village.Record vr, org.apache.torque.util.Criteria c)
          Instantiates the attributes of the Address object from a Record object
 
Method Summary
 void createFormattedAddresses()
          Based on the address templates, the formatted addresses are created.
 int getAddressFormatId()
           
 java.lang.String getAddressFormatTemplate()
          An example template is $firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country'.
 java.lang.String getAddressSummaryTemplate()
          An example summary template is $city / $country'.
 java.lang.String getCity()
           
 java.lang.String getCompany()
           
 int getCountryId()
           
 java.lang.String getCountryName()
           
 java.lang.String getCustom1()
           
 java.lang.String getCustom2()
           
 java.lang.String getCustom3()
           
 java.lang.String getCustom4()
           
 java.lang.String getCustom5()
           
 int getCustomerId()
           
 java.lang.String getEmailAddr()
           
 java.lang.String getFirstName()
           
 java.lang.String getFormattedAddress()
          It is formatted based on the address format template.
 java.lang.String getGender()
           
 int getId()
           
 boolean getIsPrimary()
           
 java.lang.String getLastName()
           
 java.lang.String getPostcode()
           
 java.lang.String getState()
           
 java.lang.String getStreetAddress()
           
 java.lang.String getStreetAddress1()
           
 java.lang.String getSuburb()
           
 java.lang.String getSummaryAddress()
          It is formatted based on the address summary format template.
 java.lang.String getTelephoneNumber()
           
 java.lang.String getTelephoneNumber1()
           
 int getZoneId()
           
 boolean isUseZoneId()
          Used when editing and inserting an address.
 void setAddressFormatId(int addressFormatId)
           
 void setAddressFormatTemplate(java.lang.String addressFormatTemplate)
          An example template is $firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country'.
 void setAddressSummaryTemplate(java.lang.String addressSummaryTemplate)
          An example summary template is $city / $country'.
 void setCity(java.lang.String city)
           
 void setCompany(java.lang.String company)
           
 void setCountryId(int countryId)
           
 void setCountryName(java.lang.String countryName)
           
 void setCustom1(java.lang.String custom1)
           
 void setCustom2(java.lang.String custom2)
           
 void setCustom3(java.lang.String custom3)
           
 void setCustom4(java.lang.String custom4)
           
 void setCustom5(java.lang.String custom5)
           
 void setCustomerId(int customerId)
           
 void setEmailAddr(java.lang.String emailAddr)
           
 void setFirstName(java.lang.String firstName)
           
 void setFormattedAddress(java.lang.String formattedAddress)
          It is formatted based on the address format template.
 void setGender(java.lang.String gender)
           
 void setId(int id)
           
 void setIsPrimary(boolean isPrimary)
           
 void setLastName(java.lang.String lastName)
           
 void setPostcode(java.lang.String postcode)
           
 void setState(java.lang.String state)
           
 void setStreetAddress(java.lang.String streetAddress)
           
 void setStreetAddress1(java.lang.String streetAddress1)
           
 void setSuburb(java.lang.String suburb)
           
 void setSummaryAddress(java.lang.String summaryAddress)
          It is formatted based on the address summary format template.
 void setTelephoneNumber(java.lang.String telephoneNumber)
           
 void setTelephoneNumber1(java.lang.String telephoneNumber1)
           
 void setUseZoneId(boolean useZoneId)
          Used when editing and inserting an address.
 void setZoneId(int zoneId)
           
 java.lang.String toString()
           
 java.lang.String toStringBrief()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Address

public Address()
Constructor


Address

public Address(com.workingdogs.village.Record vr,
               org.apache.torque.util.Criteria c)
        throws com.workingdogs.village.DataSetException
Instantiates the attributes of the Address object from a Record object

Parameters:
vr - Record containing data
c - Criteria containing column names
Throws:
com.workingdogs.village.DataSetException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Returns a string containing the attributes of the Address object.

createFormattedAddresses

public void createFormattedAddresses()
Based on the address templates, the formatted addresses are created. An example template is :
$firstname $lastname$cr$company$cr$streets$cr$city, $postcode$cr$state, $country$crtel: $telephone $telephone1$cremail: $email
Valid template attributes are: Note that streets is customerStreetAddress + line break + customerSuburb .


toStringBrief

public java.lang.String toStringBrief()
Returns:
Returns a string containing selected attributes of the Address object.

getCity

public java.lang.String getCity()
Specified by:
getCity in interface AddressIf
Returns:
Returns the city.

setCity

public void setCity(java.lang.String city)
Specified by:
setCity in interface AddressIf
Parameters:
city - The city to set.

getCompany

public java.lang.String getCompany()
Specified by:
getCompany in interface AddressIf
Returns:
Returns the company.

setCompany

public void setCompany(java.lang.String company)
Specified by:
setCompany in interface AddressIf
Parameters:
company - The company to set.

getCountryId

public int getCountryId()
Specified by:
getCountryId in interface AddressIf
Returns:
Returns the country.

setCountryId

public void setCountryId(int countryId)
Specified by:
setCountryId in interface AddressIf
Parameters:
countryId - The country to set.

getCustomerId

public int getCustomerId()
Specified by:
getCustomerId in interface AddressIf
Returns:
Returns the customerId.

setCustomerId

public void setCustomerId(int customerId)
Specified by:
setCustomerId in interface AddressIf
Parameters:
customerId - The customerId to set.

getFirstName

public java.lang.String getFirstName()
Specified by:
getFirstName in interface AddressIf
Returns:
Returns the firstName.

setFirstName

public void setFirstName(java.lang.String firstName)
Specified by:
setFirstName in interface AddressIf
Parameters:
firstName - The firstName to set.

getGender

public java.lang.String getGender()
Specified by:
getGender in interface AddressIf
Returns:
Returns the gender.

setGender

public void setGender(java.lang.String gender)
Specified by:
setGender in interface AddressIf
Parameters:
gender - The gender to set.

getId

public int getId()
Specified by:
getId in interface AddressIf
Returns:
Returns the id.

setId

public void setId(int id)
Specified by:
setId in interface AddressIf
Parameters:
id - The id to set.

getLastName

public java.lang.String getLastName()
Specified by:
getLastName in interface AddressIf
Returns:
Returns the lastName.

setLastName

public void setLastName(java.lang.String lastName)
Specified by:
setLastName in interface AddressIf
Parameters:
lastName - The lastName to set.

getPostcode

public java.lang.String getPostcode()
Specified by:
getPostcode in interface AddressIf
Returns:
Returns the postcode.

setPostcode

public void setPostcode(java.lang.String postcode)
Specified by:
setPostcode in interface AddressIf
Parameters:
postcode - The postcode to set.

getState

public java.lang.String getState()
Specified by:
getState in interface AddressIf
Returns:
Returns the state.

setState

public void setState(java.lang.String state)
Specified by:
setState in interface AddressIf
Parameters:
state - The state to set.

getStreetAddress

public java.lang.String getStreetAddress()
Specified by:
getStreetAddress in interface AddressIf
Returns:
Returns the streetAddress.

setStreetAddress

public void setStreetAddress(java.lang.String streetAddress)
Specified by:
setStreetAddress in interface AddressIf
Parameters:
streetAddress - The streetAddress to set.

getSuburb

public java.lang.String getSuburb()
Specified by:
getSuburb in interface AddressIf
Returns:
Returns the suburb.

setSuburb

public void setSuburb(java.lang.String suburb)
Specified by:
setSuburb in interface AddressIf
Parameters:
suburb - The suburb to set.

getZoneId

public int getZoneId()
Specified by:
getZoneId in interface AddressIf
Returns:
Returns the zoneId.

setZoneId

public void setZoneId(int zoneId)
Specified by:
setZoneId in interface AddressIf
Parameters:
zoneId - The zoneId to set.

getAddressFormatTemplate

public java.lang.String getAddressFormatTemplate()
Description copied from interface: AddressIf
An example template is $firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country'.

Specified by:
getAddressFormatTemplate in interface AddressIf
Returns:
Returns the addressFormatTemplate.

setAddressFormatTemplate

public void setAddressFormatTemplate(java.lang.String addressFormatTemplate)
Description copied from interface: AddressIf
An example template is $firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country'.

Specified by:
setAddressFormatTemplate in interface AddressIf
Parameters:
addressFormatTemplate - The addressFormatTemplate to set.

getAddressSummaryTemplate

public java.lang.String getAddressSummaryTemplate()
Description copied from interface: AddressIf
An example summary template is $city / $country'.

Specified by:
getAddressSummaryTemplate in interface AddressIf
Returns:
Returns the addressSummaryTemplate.

setAddressSummaryTemplate

public void setAddressSummaryTemplate(java.lang.String addressSummaryTemplate)
Description copied from interface: AddressIf
An example summary template is $city / $country'.

Specified by:
setAddressSummaryTemplate in interface AddressIf
Parameters:
addressSummaryTemplate - The addressSummaryTemplate to set.

getFormattedAddress

public java.lang.String getFormattedAddress()
Description copied from interface: AddressIf
It is formatted based on the address format template.

Specified by:
getFormattedAddress in interface AddressIf
Returns:
Returns the formattedAddress.

setFormattedAddress

public void setFormattedAddress(java.lang.String formattedAddress)
Description copied from interface: AddressIf
It is formatted based on the address format template.

Specified by:
setFormattedAddress in interface AddressIf
Parameters:
formattedAddress - The formattedAddress to set.

getSummaryAddress

public java.lang.String getSummaryAddress()
Description copied from interface: AddressIf
It is formatted based on the address summary format template.

Specified by:
getSummaryAddress in interface AddressIf
Returns:
Returns the summaryAddress.

setSummaryAddress

public void setSummaryAddress(java.lang.String summaryAddress)
Description copied from interface: AddressIf
It is formatted based on the address summary format template.

Specified by:
setSummaryAddress in interface AddressIf
Parameters:
summaryAddress - The summaryAddress to set.

getCountryName

public java.lang.String getCountryName()
Specified by:
getCountryName in interface AddressIf
Returns:
Returns the countryName.

setCountryName

public void setCountryName(java.lang.String countryName)
Specified by:
setCountryName in interface AddressIf
Parameters:
countryName - The countryName to set.

getIsPrimary

public boolean getIsPrimary()
Specified by:
getIsPrimary in interface AddressIf
Returns:
Returns the isPrimary.

setIsPrimary

public void setIsPrimary(boolean isPrimary)
Specified by:
setIsPrimary in interface AddressIf
Parameters:
isPrimary - The isPrimary to set.

getAddressFormatId

public int getAddressFormatId()
Specified by:
getAddressFormatId in interface AddressIf
Returns:
Returns the addressFormatId.

setAddressFormatId

public void setAddressFormatId(int addressFormatId)
Specified by:
setAddressFormatId in interface AddressIf
Parameters:
addressFormatId - The addressFormatId to set.

getCustom1

public java.lang.String getCustom1()
Specified by:
getCustom1 in interface AddressIf
Returns:
Returns the custom1.

setCustom1

public void setCustom1(java.lang.String custom1)
Specified by:
setCustom1 in interface AddressIf
Parameters:
custom1 - The custom1 to set.

getCustom2

public java.lang.String getCustom2()
Specified by:
getCustom2 in interface AddressIf
Returns:
Returns the custom2.

setCustom2

public void setCustom2(java.lang.String custom2)
Specified by:
setCustom2 in interface AddressIf
Parameters:
custom2 - The custom2 to set.

getCustom3

public java.lang.String getCustom3()
Specified by:
getCustom3 in interface AddressIf
Returns:
Returns the custom3.

setCustom3

public void setCustom3(java.lang.String custom3)
Specified by:
setCustom3 in interface AddressIf
Parameters:
custom3 - The custom3 to set.

getCustom4

public java.lang.String getCustom4()
Specified by:
getCustom4 in interface AddressIf
Returns:
Returns the custom4.

setCustom4

public void setCustom4(java.lang.String custom4)
Specified by:
setCustom4 in interface AddressIf
Parameters:
custom4 - The custom4 to set.

getCustom5

public java.lang.String getCustom5()
Specified by:
getCustom5 in interface AddressIf
Returns:
Returns the custom5.

setCustom5

public void setCustom5(java.lang.String custom5)
Specified by:
setCustom5 in interface AddressIf
Parameters:
custom5 - The custom5 to set.

getTelephoneNumber

public java.lang.String getTelephoneNumber()
Specified by:
getTelephoneNumber in interface AddressIf
Returns:
the telephoneNumber

setTelephoneNumber

public void setTelephoneNumber(java.lang.String telephoneNumber)
Specified by:
setTelephoneNumber in interface AddressIf
Parameters:
telephoneNumber - the telephoneNumber to set

getTelephoneNumber1

public java.lang.String getTelephoneNumber1()
Specified by:
getTelephoneNumber1 in interface AddressIf
Returns:
the telephoneNumber1

setTelephoneNumber1

public void setTelephoneNumber1(java.lang.String telephoneNumber1)
Specified by:
setTelephoneNumber1 in interface AddressIf
Parameters:
telephoneNumber1 - the telephoneNumber1 to set

getEmailAddr

public java.lang.String getEmailAddr()
Specified by:
getEmailAddr in interface AddressIf
Returns:
the emailAddr

setEmailAddr

public void setEmailAddr(java.lang.String emailAddr)
Specified by:
setEmailAddr in interface AddressIf
Parameters:
emailAddr - the emailAddr to set

getStreetAddress1

public java.lang.String getStreetAddress1()
Specified by:
getStreetAddress1 in interface AddressIf
Returns:
the streetAddress1

setStreetAddress1

public void setStreetAddress1(java.lang.String streetAddress1)
Specified by:
setStreetAddress1 in interface AddressIf
Parameters:
streetAddress1 - the streetAddress1 to set

isUseZoneId

public boolean isUseZoneId()
Description copied from interface: AddressIf
Used when editing and inserting an address. If set to true, then the zoneId is used rather than looking up the zone.

Specified by:
isUseZoneId in interface AddressIf
Returns:
the useZoneId

setUseZoneId

public void setUseZoneId(boolean useZoneId)
Description copied from interface: AddressIf
Used when editing and inserting an address. If set to true, then the zoneId is used rather than looking up the zone.

Specified by:
setUseZoneId in interface AddressIf
Parameters:
useZoneId - the useZoneId to set


Copyright © 2011 DS Data Systems UK Ltd.