]> git.mxchange.org Git - jfinancials-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 24 Nov 2018 15:40:30 +0000 (16:40 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 24 Nov 2018 15:40:30 +0000 (16:40 +0100)
- removed category reference, is already in product

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jfinancials/model/receipt_item/BillableReceiptItem.java
src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItem.java

index 3ced262ebb28b79d22a9c380e3870d1bc58ceb1f..e840c2f202e9459d55dbb0fc8039d795acee36e8 100644 (file)
@@ -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<BillableReceiptItem>, Serializable {
 
-       /**
-        * Getter for item's product category
-        * <p>
-        * @return Item's product category
-        */
-       Category getItemCategory ();
-
-       /**
-        * Setter for item's product category
-        * <p>
-        * @param itemCategory Item's product category
-        */
-       void setItemCategory (final Category itemCategory);
-
        /**
         * Getter when this receipt item has been created in database
         * <p>
index b8c69a6da07b104a14f0624359d795ded6209520..7805ffc1106801036cae9ecd7ef23e65975e0f7a 100644 (file)
@@ -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;