From: Roland Häder Date: Sat, 24 Nov 2018 15:40:30 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3c7b49ddf8178a2eb307f8d0335a904f5a78bda2;p=jbonuscard-core.git Continued: - removed category reference, is already in product Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jfinancials/model/receipt_item/BillableReceiptItem.java b/src/org/mxchange/jfinancials/model/receipt_item/BillableReceiptItem.java index 3ced262..e840c2f 100644 --- a/src/org/mxchange/jfinancials/model/receipt_item/BillableReceiptItem.java +++ b/src/org/mxchange/jfinancials/model/receipt_item/BillableReceiptItem.java @@ -21,7 +21,6 @@ import java.math.BigDecimal; import java.util.Date; import org.mxchange.jcontactsbusiness.model.basicdata.BasicData; import org.mxchange.jfinancials.model.receipt.BillableReceipt; -import org.mxchange.jproduct.model.category.Category; import org.mxchange.jproduct.model.product.Product; /** @@ -31,20 +30,6 @@ import org.mxchange.jproduct.model.product.Product; */ public interface BillableReceiptItem extends Comparable, Serializable { - /** - * Getter for item's product category - *

- * @return Item's product category - */ - Category getItemCategory (); - - /** - * Setter for item's product category - *

- * @param itemCategory Item's product category - */ - void setItemCategory (final Category itemCategory); - /** * Getter when this receipt item has been created in database *

diff --git a/src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItem.java b/src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItem.java index b8c69a6..7805ffc 100644 --- a/src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItem.java +++ b/src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItem.java @@ -42,9 +42,6 @@ import org.mxchange.jcoreutils.SafeNumberUtils; import org.mxchange.jfinancials.model.receipt.BillableReceipt; import org.mxchange.jfinancials.model.receipt.FinancialReceipt; import org.mxchange.jfinancials.model.receipt.Receipts; -import org.mxchange.jproduct.model.category.Categories; -import org.mxchange.jproduct.model.category.Category; -import org.mxchange.jproduct.model.category.ProductCategory; import org.mxchange.jproduct.model.product.GenericProduct; import org.mxchange.jproduct.model.product.Product; import org.mxchange.jproduct.model.product.Products; @@ -80,13 +77,6 @@ public class FinancialReceiptItem implements BillableReceiptItem { @Column (name = "item_brand_name") private String itemBrandName; - /** - * Category being assigned to item's product - */ - @JoinColumn (name = "item_category_id", referencedColumnName = "category_id", updatable = false) - @OneToOne (targetEntity = ProductCategory.class, cascade = CascadeType.REFRESH, optional = false) - private Category itemCategory; - /** * Item 's coupon number */ @@ -194,7 +184,6 @@ public class FinancialReceiptItem implements BillableReceiptItem { this(); // Set all values - this.itemCategory = itemProduct.getProductCategory(); this.itemProduct = itemProduct; this.itemProductQuantity = itemProductQuantity; this.itemReceipt = itemReceipt; @@ -229,8 +218,6 @@ public class FinancialReceiptItem implements BillableReceiptItem { this.getItemProductQuantity().compareTo(billableReceiptItem.getItemProductQuantity()), // ... product instance Products.compare(this.getItemProduct(), billableReceiptItem.getItemProduct()), - // ... category instance - Categories.compare(this.getItemCategory(), billableReceiptItem.getItemCategory()), // and finally receipt instance Receipts.compare(this.getItemReceipt(), billableReceiptItem.getItemReceipt()) }; @@ -281,16 +268,6 @@ public class FinancialReceiptItem implements BillableReceiptItem { this.itemBrandName = itemBrandName; } - @Override - public Category getItemCategory () { - return this.itemCategory; - } - - @Override - public void setItemCategory (final Category itemCategory) { - this.itemCategory = itemCategory; - } - @Override public String getItemCouponNumber () { return this.itemCouponNumber;