Class CustomerDwhInfoEntity


  • public class CustomerDwhInfoEntity
    extends java.lang.Object
    Customer Dwh Info Entity - one of the business entities in this example.
    This entity gives us a lot of information collected or derived in our company's data warehouse
    Author:
    Karl Eilebrecht
    • Method Detail

      • getCustomerId

        public java.lang.String getCustomerId()
        Returns the customer ID
        Returns:
        customerId
      • setCustomerId

        public void setCustomerId​(java.lang.String customerId)
        Sets the customer ID
        Parameters:
        customerId - identifier
      • getCustomerType

        public java.lang.String getCustomerType()
        Returns the type of customer (classification)
        Returns:
        customerType
      • setCustomerType

        public void setCustomerType​(java.lang.String customerType)
        Sets the customer type
        Parameters:
        customerType - type of customer
      • getScorePoints

        public int getScorePoints()
        Returns the score points for this customer
        Returns:
        scorePoints
      • setScorePoints

        public void setScorePoints​(int scorePoints)
        Sets the score points
        Parameters:
        scorePoints - value from scoring process
      • getFirstOrderDate

        public java.util.Date getFirstOrderDate()
        Returns the date of first order placed by this customer
        Returns:
        firstOrderDate
      • setFirstOrderDate

        public void setFirstOrderDate​(java.util.Date firstOrderDate)
        Sets the date of first order placed by this customer
        Parameters:
        firstOrderDate - date of first order
      • getLastOrderDate

        public java.util.Date getLastOrderDate()
        Returns the date of least recent order placed by this customer
        Returns:
        lastOrderDate
      • setLastOrderDate

        public void setLastOrderDate​(java.util.Date lastOrderDate)
        Sets the date of least recent order placed by this customer
        Parameters:
        lastOrderDate - date of least recent order
      • isDueInvoice

        public boolean isDueInvoice()
        Returns whether this customer has an open invoice
        Returns:
        true whether there is an open invoice
      • setDueInvoice

        public void setDueInvoice​(boolean dueInvoice)
        Sets the due invoice flag
        Parameters:
        dueInvoice - true indicates an open invoice not payed yet
      • isFraudSuspicion

        public boolean isFraudSuspicion()
        Returns whether this customer could be a fraud
        Returns:
        fraudSuspicion
      • setFraudSuspicion

        public void setFraudSuspicion​(boolean fraudSuspicion)
        Sets the fraud suspicion flag
        Parameters:
        fraudSuspicion - flag to indicate that we suspect illegal activities
      • isBadPayer

        public boolean isBadPayer()
        Returns whether this customer is a bad payer
        Returns:
        badPayer flag
      • setBadPayer

        public void setBadPayer​(boolean badPayer)
        Sets the bad payer flag
        Parameters:
        badPayer - flag to indicate a customer who pays late or only after reminding
      • toDto

        public CustomerDwhInfoDto toDto()
        Returns a data transfer object with the data from this entity
        Returns:
        data transfer object
      • fromDto

        public void fromDto​(CustomerDwhInfoDto dto)
        Updates this entity from the given data transfer object
        Parameters:
        dto - data transfer object to copy data from into this object
      • toString

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