Class CustomerCompany

java.lang.Object
de.calamanari.pk.visitor.CustomerCompany

public class CustomerCompany
extends java.lang.Object
Customer Company - part of customer structure, may carry a discount negotiated between us (seller) and the company.
Author:
Karl Eilebrecht
  • Constructor Summary

    Constructors
    Constructor Description
    CustomerCompany​(CustomerHolding holding, java.lang.String name, double discountPerc)
    Creates new company
  • Method Summary

    Modifier and Type Method Description
    void accept​(EnterpriseVisitor visitor)
    Method to accept enterprise visitor
    double getDiscountPerc()
    Returns the discount percentage value, to be applied to all orders placed by members of this company.
    CustomerHolding getHolding()
    Returns the holding this company belongs to
    java.lang.String getName()
    Returns comany name
    void setDiscountPerc​(double discountPerc)
    Sets the discount percentage value, to be applied to all orders placed by members of this company.
    void setHolding​(CustomerHolding holding)
    Sets the holding this company belongs to
    void setName​(java.lang.String name)
    Sets the company name
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

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

    • CustomerCompany

      public CustomerCompany​(CustomerHolding holding, java.lang.String name, double discountPerc)
      Creates new company
      Parameters:
      holding - optional holding this company belongs to
      name - company's name
      discountPerc - discount percentage for the company
  • Method Details

    • getName

      public java.lang.String getName()
      Returns comany name
      Returns:
      name of company
    • setName

      public void setName​(java.lang.String name)
      Sets the company name
      Parameters:
      name - company's name
    • getDiscountPerc

      public double getDiscountPerc()
      Returns the discount percentage value, to be applied to all orders placed by members of this company.
      Returns:
      discount
    • setDiscountPerc

      public void setDiscountPerc​(double discountPerc)
      Sets the discount percentage value, to be applied to all orders placed by members of this company.
      Parameters:
      discountPerc - discount percentage for the company
    • getHolding

      Returns the holding this company belongs to
      Returns:
      holding or null
    • setHolding

      public void setHolding​(CustomerHolding holding)
      Sets the holding this company belongs to
      Parameters:
      holding - or null
    • accept

      public void accept​(EnterpriseVisitor visitor)
      Method to accept enterprise visitor
      Parameters:
      visitor - current visitor
    • toString

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