Class AddressEntity

java.lang.Object
de.calamanari.pk.identitymap.AddressEntity
All Implemented Interfaces:
Entity<java.lang.String>

public class AddressEntity
extends java.lang.Object
implements Entity<java.lang.String>
Address Entity - one of the business entities in this example.
Author:
Karl Eilebrecht
  • Constructor Summary

    Constructors
    Constructor Description
    AddressEntity()
    Creates new address entity
    AddressEntity​(java.lang.String addressId, java.lang.String customerId, java.lang.String street, java.lang.String zipCode, java.lang.String city, java.lang.String country, java.lang.String salutation)
    Creates new address entity from the given data
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getCity()
    Returns the city name
    java.lang.String getCountry()
    Returns the country name
    java.lang.String getCustomerId()
    Returns the customer ID
    java.lang.String getId()
    Returns the address-ID
    java.lang.String getSalutation()
    Returns salutation for letters
    java.lang.String getStreet()
    Returns street address
    java.lang.String getZipCode()
    Returns the zipcode
    void setAddressId​(java.lang.String id)
    Sets the address-ID
    void setCity​(java.lang.String city)
    Sets the city name
    void setCountry​(java.lang.String country)
    Sets the country
    void setCustomerId​(java.lang.String customerId)
    Sets the customer ID
    void setSalutation​(java.lang.String salutation)
    Sets the salutation for letters
    void setStreet​(java.lang.String street)
    Sets street address
    void setZipCode​(java.lang.String zipCode)
    Sets the zipCode
    AddressEntity shallowCopy()
    Creates a duplicate with the same values as this object
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AddressEntity

      public AddressEntity()
      Creates new address entity
    • AddressEntity

      public AddressEntity​(java.lang.String addressId, java.lang.String customerId, java.lang.String street, java.lang.String zipCode, java.lang.String city, java.lang.String country, java.lang.String salutation)
      Creates new address entity from the given data
      Parameters:
      addressId - identifier
      customerId - owning customer identifier
      street - address field
      zipCode - address field
      city - address field
      country - address field
      salutation - address field
  • Method Details

    • getId

      public java.lang.String getId()
      Returns the address-ID
      Specified by:
      getId in interface Entity<java.lang.String>
      Returns:
      id
    • setAddressId

      public void setAddressId​(java.lang.String id)
      Sets the address-ID
      Parameters:
      id - identifier
    • getCustomerId

      public java.lang.String getCustomerId()
      Returns the customer ID
      Returns:
      customerId
    • setCustomerId

      public void setCustomerId​(java.lang.String customerId)
      Sets the customer ID
      Parameters:
      customerId - identifier of the owning customer
    • getStreet

      public java.lang.String getStreet()
      Returns street address
      Returns:
      street
    • setStreet

      public void setStreet​(java.lang.String street)
      Sets street address
      Parameters:
      street - address field
    • getZipCode

      public java.lang.String getZipCode()
      Returns the zipcode
      Returns:
      zipCode address field
    • setZipCode

      public void setZipCode​(java.lang.String zipCode)
      Sets the zipCode
      Parameters:
      zipCode - address field
    • getCity

      public java.lang.String getCity()
      Returns the city name
      Returns:
      city address field
    • setCity

      public void setCity​(java.lang.String city)
      Sets the city name
      Parameters:
      city - address field
    • getCountry

      public java.lang.String getCountry()
      Returns the country name
      Returns:
      country
    • setCountry

      public void setCountry​(java.lang.String country)
      Sets the country
      Parameters:
      country - address field
    • getSalutation

      public java.lang.String getSalutation()
      Returns salutation for letters
      Returns:
      salutation
    • setSalutation

      public void setSalutation​(java.lang.String salutation)
      Sets the salutation for letters
      Parameters:
      salutation - address field
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • shallowCopy

      Creates a duplicate with the same values as this object
      Returns:
      duplicate