Record Class SalesReportData

java.lang.Object
java.lang.Record
app.model.SalesReportData

public record SalesReportData(long orderCount, BigDecimal totalSales, BigDecimal averageOrderValue, BigDecimal estimatedGrossProfit, boolean profitEstimateComplete, List<SalesReportRow> itemSales, List<SalesTrendRow> dailySales, List<PaymentMethodSales> paymentMethods, List<EmployeeSales> employeeSales) extends Record
  • Field Details

    • orderCount

      private final long orderCount
      The field for the orderCount record component.
    • totalSales

      private final BigDecimal totalSales
      The field for the totalSales record component.
    • averageOrderValue

      private final BigDecimal averageOrderValue
      The field for the averageOrderValue record component.
    • estimatedGrossProfit

      private final BigDecimal estimatedGrossProfit
      The field for the estimatedGrossProfit record component.
    • profitEstimateComplete

      private final boolean profitEstimateComplete
      The field for the profitEstimateComplete record component.
    • itemSales

      private final List<SalesReportRow> itemSales
      The field for the itemSales record component.
    • dailySales

      private final List<SalesTrendRow> dailySales
      The field for the dailySales record component.
    • paymentMethods

      private final List<PaymentMethodSales> paymentMethods
      The field for the paymentMethods record component.
    • employeeSales

      private final List<EmployeeSales> employeeSales
      The field for the employeeSales record component.
  • Constructor Details

    • SalesReportData

      public SalesReportData(long orderCount, BigDecimal totalSales, BigDecimal averageOrderValue, BigDecimal estimatedGrossProfit, boolean profitEstimateComplete, List<SalesReportRow> itemSales, List<SalesTrendRow> dailySales, List<PaymentMethodSales> paymentMethods, List<EmployeeSales> employeeSales)
      Creates an instance of a SalesReportData record class.
      Parameters:
      orderCount - the value for the orderCount record component
      totalSales - the value for the totalSales record component
      averageOrderValue - the value for the averageOrderValue record component
      estimatedGrossProfit - the value for the estimatedGrossProfit record component
      profitEstimateComplete - the value for the profitEstimateComplete record component
      itemSales - the value for the itemSales record component
      dailySales - the value for the dailySales record component
      paymentMethods - the value for the paymentMethods record component
      employeeSales - the value for the employeeSales record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • orderCount

      public long orderCount()
      Returns the value of the orderCount record component.
      Returns:
      the value of the orderCount record component
    • totalSales

      public BigDecimal totalSales()
      Returns the value of the totalSales record component.
      Returns:
      the value of the totalSales record component
    • averageOrderValue

      public BigDecimal averageOrderValue()
      Returns the value of the averageOrderValue record component.
      Returns:
      the value of the averageOrderValue record component
    • estimatedGrossProfit

      public BigDecimal estimatedGrossProfit()
      Returns the value of the estimatedGrossProfit record component.
      Returns:
      the value of the estimatedGrossProfit record component
    • profitEstimateComplete

      public boolean profitEstimateComplete()
      Returns the value of the profitEstimateComplete record component.
      Returns:
      the value of the profitEstimateComplete record component
    • itemSales

      public List<SalesReportRow> itemSales()
      Returns the value of the itemSales record component.
      Returns:
      the value of the itemSales record component
    • dailySales

      public List<SalesTrendRow> dailySales()
      Returns the value of the dailySales record component.
      Returns:
      the value of the dailySales record component
    • paymentMethods

      public List<PaymentMethodSales> paymentMethods()
      Returns the value of the paymentMethods record component.
      Returns:
      the value of the paymentMethods record component
    • employeeSales

      public List<EmployeeSales> employeeSales()
      Returns the value of the employeeSales record component.
      Returns:
      the value of the employeeSales record component