Class CustomerDivision

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

public class CustomerDivision
extends java.lang.Object
Customer Division - part of customer structure, a customer's business division may carry a special discount negotiated between us (seller) and the division manager. Division discounts ALWAYS replace company discounts.
Author:
Karl Eilebrecht
  • Constructor Summary

    Constructors
    Constructor Description
    CustomerDivision​(CustomerCompany company, java.lang.String name, double divisionDiscountPerc)
    Creates new Customer division
  • Method Summary

    Modifier and Type Method Description
    void accept​(EnterpriseVisitor visitor)
    Method to accept enterprise visitor
    CustomerCompany getCompany()
    Returns the company this division belongs to
    double getDivisionDiscountPerc()
    Returns the discount percentage value, to be applied to all orders placed by members of this division.
    java.lang.String getName()
    Returns division name
    void setDivisionDiscountPerc​(double discountPerc)
    Sets the discount percentage value, to be applied to all orders placed by members of this division.
    void setName​(java.lang.String name)
    Sets the division name
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

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

    • CustomerDivision

      public CustomerDivision​(CustomerCompany company, java.lang.String name, double divisionDiscountPerc)
      Creates new Customer division
      Parameters:
      company - customer company the division belongs to
      name - divison's name
      divisionDiscountPerc - discount percentage for this division
  • Method Details

    • getName

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

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

      public double getDivisionDiscountPerc()
      Returns the discount percentage value, to be applied to all orders placed by members of this division.
      Returns:
      discount
    • setDivisionDiscountPerc

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

      Returns the company this division belongs to
      Returns:
      customer company
    • 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