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 Summary
FieldsModifier and TypeFieldDescriptionprivate final BigDecimalThe field for theaverageOrderValuerecord component.private final List<SalesTrendRow> The field for thedailySalesrecord component.private final List<EmployeeSales> The field for theemployeeSalesrecord component.private final BigDecimalThe field for theestimatedGrossProfitrecord component.private final List<SalesReportRow> The field for theitemSalesrecord component.private final longThe field for theorderCountrecord component.private final List<PaymentMethodSales> The field for thepaymentMethodsrecord component.private final booleanThe field for theprofitEstimateCompleterecord component.private final BigDecimalThe field for thetotalSalesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSalesReportData(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 aSalesReportDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaverageOrderValuerecord component.Returns the value of thedailySalesrecord component.Returns the value of theemployeeSalesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theestimatedGrossProfitrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theitemSalesrecord component.longReturns the value of theorderCountrecord component.Returns the value of thepaymentMethodsrecord component.booleanReturns the value of theprofitEstimateCompleterecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetotalSalesrecord component.
-
Field Details
-
orderCount
private final long orderCountThe field for theorderCountrecord component. -
totalSales
The field for thetotalSalesrecord component. -
averageOrderValue
The field for theaverageOrderValuerecord component. -
estimatedGrossProfit
The field for theestimatedGrossProfitrecord component. -
profitEstimateComplete
private final boolean profitEstimateCompleteThe field for theprofitEstimateCompleterecord component. -
itemSales
The field for theitemSalesrecord component. -
dailySales
The field for thedailySalesrecord component. -
paymentMethods
The field for thepaymentMethodsrecord component. -
employeeSales
The field for theemployeeSalesrecord 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 aSalesReportDatarecord class.- Parameters:
orderCount- the value for theorderCountrecord componenttotalSales- the value for thetotalSalesrecord componentaverageOrderValue- the value for theaverageOrderValuerecord componentestimatedGrossProfit- the value for theestimatedGrossProfitrecord componentprofitEstimateComplete- the value for theprofitEstimateCompleterecord componentitemSales- the value for theitemSalesrecord componentdailySales- the value for thedailySalesrecord componentpaymentMethods- the value for thepaymentMethodsrecord componentemployeeSales- the value for theemployeeSalesrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
orderCount
public long orderCount()Returns the value of theorderCountrecord component.- Returns:
- the value of the
orderCountrecord component
-
totalSales
Returns the value of thetotalSalesrecord component.- Returns:
- the value of the
totalSalesrecord component
-
averageOrderValue
Returns the value of theaverageOrderValuerecord component.- Returns:
- the value of the
averageOrderValuerecord component
-
estimatedGrossProfit
Returns the value of theestimatedGrossProfitrecord component.- Returns:
- the value of the
estimatedGrossProfitrecord component
-
profitEstimateComplete
public boolean profitEstimateComplete()Returns the value of theprofitEstimateCompleterecord component.- Returns:
- the value of the
profitEstimateCompleterecord component
-
itemSales
Returns the value of theitemSalesrecord component.- Returns:
- the value of the
itemSalesrecord component
-
dailySales
Returns the value of thedailySalesrecord component.- Returns:
- the value of the
dailySalesrecord component
-
paymentMethods
Returns the value of thepaymentMethodsrecord component.- Returns:
- the value of the
paymentMethodsrecord component
-
employeeSales
Returns the value of theemployeeSalesrecord component.- Returns:
- the value of the
employeeSalesrecord component
-