Class Address


  • public class Address
    extends java.lang.Object
    Address - entity in COARSE GRAINED LOCK example
    Author:
    Karl Eilebrecht
    • Constructor Summary

      Constructors 
      Constructor Description
      Address​(java.lang.String id, java.lang.String customerId, java.lang.String street, java.lang.String city, java.lang.String zipCode)
      Creates a new Address using the given parameters
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCity()
      Returns the city
      java.lang.String getCustomerId()
      Returns the related customer id
      java.lang.String getId()
      Returns address id
      java.lang.String getStreet()
      Returns the street
      java.lang.String getZipCode()
      Returns the zip code
      void setCity​(java.lang.String city)
      Sets the city
      void setStreet​(java.lang.String street)
      Sets the street
      void setZipCode​(java.lang.String zipCode)
      Sets the zip code
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • Address

        public Address​(java.lang.String id,
                       java.lang.String customerId,
                       java.lang.String street,
                       java.lang.String city,
                       java.lang.String zipCode)
        Creates a new Address using the given parameters
        Parameters:
        id - identifier
        customerId - related person identifier
        street - address field
        city - address field
        zipCode - address field
    • Method Detail

      • getId

        public java.lang.String getId()
        Returns address id
        Returns:
        address id
      • getCustomerId

        public java.lang.String getCustomerId()
        Returns the related customer id
        Returns:
        customerId
      • getStreet

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

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

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

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

        public java.lang.String getZipCode()
        Returns the zip code
        Returns:
        zip code
      • setZipCode

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

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