From 3c7b49ddf8178a2eb307f8d0335a904f5a78bda2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 24 Nov 2018 16:40:30 +0100 Subject: [PATCH] Continued: - removed category reference, is already in product MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../receipt_item/BillableReceiptItem.java | 15 ------------ .../receipt_item/FinancialReceiptItem.java | 23 ------------------- 2 files changed, 38 deletions(-) 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; -- 2.39.2