Class Customer


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

      Constructors 
      Constructor Description
      Customer​(java.lang.String customerId, java.lang.String firstName, java.lang.String lastName)
      Creates customer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCustomerId()
      Returns id of customer
      java.lang.String getFirstName()
      Returns the first name of the customer
      java.lang.String getLastName()
      Returns the customer's last name
      void setFirstName​(java.lang.String firstName)
      Sets the first name of the customer
      void setLastName​(java.lang.String lastName)
      Sets the last name of customer
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • Customer

        public Customer​(java.lang.String customerId,
                        java.lang.String firstName,
                        java.lang.String lastName)
        Creates customer
        Parameters:
        customerId - identifier
        firstName - person's first name
        lastName - person's last name
    • Method Detail

      • getCustomerId

        public java.lang.String getCustomerId()
        Returns id of customer
        Returns:
        customerId
      • getLastName

        public java.lang.String getLastName()
        Returns the customer's last name
        Returns:
        last name of customer
      • setLastName

        public void setLastName​(java.lang.String lastName)
        Sets the last name of customer
        Parameters:
        lastName - person's last name
      • getFirstName

        public java.lang.String getFirstName()
        Returns the first name of the customer
        Returns:
        firstName
      • setFirstName

        public void setFirstName​(java.lang.String firstName)
        Sets the first name of the customer
        Parameters:
        firstName - person's first name
      • toString

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