2 * Copyright (C) 2016 - 2018 Free Software Foundation
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jfinancials.model.receipt_item;
19 import java.io.Serializable;
20 import java.math.BigDecimal;
21 import java.util.Date;
22 import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
23 import org.mxchange.jfinancials.model.receipt.BillableReceipt;
24 import org.mxchange.jproduct.model.category.Category;
25 import org.mxchange.jproduct.model.product.Product;
28 * An interface for receipt items
30 * @author Roland Häder<roland@mxchange.org>
32 public interface BillableReceiptItem extends Comparable<BillableReceiptItem>, Serializable {
35 * Getter for item's product category
37 * @return Item's product category
39 Category getItemCategory ();
42 * Setter for item's product category
44 * @param itemCategory Item's product category
46 void setItemCategory (final Category itemCategory);
49 * Getter when this receipt item has been created in database
51 * @return When this item has been created
53 Date getItemCreated ();
56 * Setter when this receipt item has been created in database
58 * @param itemCreated When this item has been created
60 void setItemCreated (final Date itemCreated);
63 * Getter for primary key
70 * Setter for primary key
72 * @param itemId Primary key
74 void setItemId (final Long itemId);
77 * Getter for whether the item is a discount on whole receipt
79 * @return Whether the item is a discount on whole receipt
81 Boolean getItemIsDiscount ();
84 * Setter for whether the item is a discount on whole receipt or item
86 * @param itemIsDiscount Whether the item is a discount on whole receipt or
89 void setItemIsDiscount (final Boolean itemIsDiscount);
92 * Getter for whether the item is a refund
94 * @return Whether the item is a refund
96 Boolean getItemIsRefund ();
99 * Setter for whether the item is a refund
101 * @param itemIsRefund Whether the item is a refund
103 void setItemIsRefund (final Boolean itemIsRefund);
106 * Getter for receipt instance
108 * @return Receipt instance
110 BillableReceipt getItemReceipt ();
113 * Setter for receipt instance
115 * @param itemReceipt Receipt instance
117 void setItemReceipt (final BillableReceipt itemReceipt);
120 * Getter for linked product
124 Product getItemProduct ();
127 * Setter for linked product
129 * @param itemProduct Product
131 void setItemProduct (final Product itemProduct);
134 * Getter for product quantity
136 * @return Product quantity
138 BigDecimal getItemProductQuantity ();
141 * Setter for product quantity
143 * @param itemProductQuantity Product quantity
145 void setItemProductQuantity (final BigDecimal itemProductQuantity);
148 * Getter for item's net price
150 * @return Item's net price
152 BigDecimal getItemNetPrice ();
155 * Setter for item's net price
157 * @param itemNetPrice Item's net price
159 void setItemNetPrice (final BigDecimal itemNetPrice);
162 * Getter for item's tax rate
164 * @return Item's tax rate
166 BigDecimal getItemTaxRate ();
169 * Setter for item's tax rate
171 * @param itemTaxRate Item's tax rate
173 void setItemTaxRate (final BigDecimal itemTaxRate);
176 * Getter for item's gross price
178 * @return Item's gross price
180 BigDecimal getItemGrossPrice ();
183 * Setter for item's gross price
185 * @param itemGrossPrice Item's gross price
187 void setItemGrossPrice (final BigDecimal itemGrossPrice);
190 * Getter for manufacturer/producer of this item
192 * @return Manufacturer/producer of this item
194 BasicData getItemManufacturer ();
197 * Setter for manufacturer/producer of this item
199 * @param itemManufacturer Manufacturer/producer of this item
201 void setItemManufacturer (final BasicData itemManufacturer);
204 * Getter for item brand name
206 * @return Item brand name
208 String getItemBrandName ();
211 * Setter for item brand name
213 * @param itemBrandName Item brand name
215 void setItemBrandName (final String itemBrandName);
218 * Getter for item number
220 * @return Item number
222 Long getItemNumber ();
225 * Setter for item number
227 * @param itemNumber Item number
229 void setItemNumber (final Long itemNumber);
232 * Getter for item's coupon number
234 * @return Item's coupon number
236 String getItemCouponNumber ();
239 * Setter for item's coupon number
241 * @param itemCouponNumber Item's coupon number
243 void setItemCouponNumber (final String itemCouponNumber);
246 boolean equals (final Object object);