Class CustomerHolding

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

public class CustomerHolding
extends java.lang.Object
Customer Holding - part of customer structure, there can be a holding discount which applies to all orders from any company related to this holding. This (additional) discount shall be an appeal for other companies from the same holding to become our customers.
Author:
Karl Eilebrecht
  • Constructor Summary

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

    Modifier and Type Method Description
    void accept​(EnterpriseVisitor visitor)
    Method to accept enterprise visitor
    double getHoldingDiscountPerc()
    Returns the discount percentage value, to be applied to all orders placed by companies related to this holding.
    java.lang.String getName()
    Returns holding name
    void setHoldingDiscountPerc​(double discountPerc)
    Sets the discount percentage value, to be applied to all orders placed by companies related to this holding.
    void setName​(java.lang.String name)
    Sets the holding name
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

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

    • CustomerHolding

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

    • getName

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

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

      public double getHoldingDiscountPerc()
      Returns the discount percentage value, to be applied to all orders placed by companies related to this holding.
      Returns:
      discount
    • setHoldingDiscountPerc

      public void setHoldingDiscountPerc​(double discountPerc)
      Sets the discount percentage value, to be applied to all orders placed by companies related to this holding.
      Parameters:
      discountPerc - discount percentage for the holding
    • 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