Class PostalAddress

java.lang.Object
com.datengaertnerei.test.dataservice.person.PostalAddress
All Implemented Interfaces:
Comparable<PostalAddress>

@Entity public class PostalAddress extends Object implements Comparable<PostalAddress>
Postal address entity class for persistence inspired by postal address schema.
Author:
Jens Dibbern
  • Constructor Details

    • PostalAddress

      public PostalAddress()
      ctor
    • PostalAddress

      public PostalAddress(String addressCountry, String addressLocality, String postalCode, String streetAddress, String houseNumber)
      Ctor with values.
      Parameters:
      addressCountry - country attribute value
      addressLocality - city attribute value
      postalCode - postal code attribute value
      streetAddress - street address attribute value
      houseNumber - house number attribute value (if applicable)
  • Method Details

    • getId

      public Long getId()
      Returns:
      getter
    • setId

      public void setId(Long id)
      Parameters:
      id - setter
    • getAddressCountry

      public String getAddressCountry()
      Returns:
      getter
    • setAddressCountry

      public void setAddressCountry(String addressCountry)
      Parameters:
      addressCountry - setter
    • getAddressLocality

      public String getAddressLocality()
      Returns:
      getter
    • setAddressLocality

      public void setAddressLocality(String addressLocality)
      Parameters:
      addressLocality - setter
    • getPostalCode

      public String getPostalCode()
      Returns:
      getter
    • setPostalCode

      public void setPostalCode(String postalCode)
      Parameters:
      postalCode - setter
    • getStreetAddress

      public String getStreetAddress()
      Returns:
      getter
    • setStreetAddress

      public void setStreetAddress(String streetAddress)
      Parameters:
      streetAddress - setter
    • getHouseNumber

      public String getHouseNumber()
      Returns:
      getter
    • setHouseNumber

      public void setHouseNumber(String houseNumber)
      Parameters:
      houseNumber - setter
    • compareTo

      public int compareTo(PostalAddress target)
      Specified by:
      compareTo in interface Comparable<PostalAddress>
    • equals

      public boolean equals(Object target)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object