]> git.mxchange.org Git - jproduct-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 28 Oct 2017 18:10:54 +0000 (20:10 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 28 Oct 2017 18:36:22 +0000 (20:36 +0200)
- cleared no longer used project JARs
- added new dependency as a product may have a manufacturing/producing company
  assigned, if such data is available on the product itself

Signed-off-by: Roland Häder <roland@mxchange.org>
lib/jcontacts-business-core.jar [new file with mode: 0644]
lib/jcontacts-core.jar [deleted file]
lib/jcoreee.jar [deleted file]
lib/jcustomer-core.jar [deleted file]
nbproject/project.properties
src/org/mxchange/jproduct/model/product/GenericProduct.java
src/org/mxchange/jproduct/model/product/Product.java

diff --git a/lib/jcontacts-business-core.jar b/lib/jcontacts-business-core.jar
new file mode 100644 (file)
index 0000000..edbddfa
Binary files /dev/null and b/lib/jcontacts-business-core.jar differ
diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar
deleted file mode 100644 (file)
index 0b7e2f0..0000000
Binary files a/lib/jcontacts-core.jar and /dev/null differ
diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar
deleted file mode 100644 (file)
index e9744a4..0000000
Binary files a/lib/jcoreee.jar and /dev/null differ
diff --git a/lib/jcustomer-core.jar b/lib/jcustomer-core.jar
deleted file mode 100644 (file)
index f738001..0000000
Binary files a/lib/jcustomer-core.jar and /dev/null differ
index 5aa176ce306b6b8ddb96539d766d91bd2ba1d46e..de3ed3b10ba70066163751de1df86503d884d685 100644 (file)
@@ -30,17 +30,13 @@ dist.jar=${dist.dir}/jproduct-core.jar
 dist.javadoc.dir=${dist.dir}/javadoc
 endorsed.classpath=
 excludes=
-file.reference.jcontacts-core.jar=lib/jcontacts-core.jar
-file.reference.jcoreee.jar=lib/jcoreee.jar
-file.reference.jcustomer-core.jar=lib/jcustomer-core.jar
+file.reference.jcontacts-business-core.jar=lib/jcontacts-business-core.jar
 includes=**
 jar.archive.disabled=${jnlp.enabled}
 jar.compress=false
 jar.index=${jnlp.enabled}
 javac.classpath=\
-    ${file.reference.jcoreee.jar}:\
-    ${file.reference.jcontacts-core.jar}:\
-    ${file.reference.jcustomer-core.jar}:\
+    ${file.reference.jcontacts-business-core.jar}:\
     ${libs.javaee-api-7.0.classpath}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
@@ -94,8 +90,6 @@ run.test.classpath=\
     ${javac.test.classpath}:\
     ${build.test.classes.dir}
 source.encoding=UTF-8
-source.reference.jcontacts-core.jar=../jcontacts-core/src/
-source.reference.jcoreee.jar=../jcoreee/src/
-source.reference.jcustomer-core.jar=../jcustomer-core/src/
+source.reference.jcontacts-business-core.jar=../jcontacts-business-core/src/
 src.dir=src
 test.src.dir=test
index f98e247871be54f45c24901d297af1f9cf294ac3..d3e2f9dd831e139e8a6c2a449c068c3d16567425 100644 (file)
@@ -33,6 +33,8 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.Transient;
+import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
+import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
 import org.mxchange.jproduct.model.category.Category;
 import org.mxchange.jproduct.model.category.ProductCategory;
 
@@ -101,6 +103,13 @@ public class GenericProduct implements Product {
        @Column (name = "product_id", nullable = false, updatable = false)
        private Long productId;
 
+       /**
+        * The company that has manufactured/produced this product
+        */
+       @JoinColumn(name = "product_manufacturer_id", referencedColumnName = "company_data_id")
+       @OneToOne(targetEntity = BusinessBasicData.class, cascade = CascadeType.REFRESH)
+       private BasicData productManfacturer;
+
        /**
         * Net price of product
         */
@@ -110,7 +119,7 @@ public class GenericProduct implements Product {
        /**
         * Tax rate (0-1, by 1=100%)
         */
-       @Column (name = "product_gross_price")
+       @Column (name = "product_tax_rate")
        private Float productTaxRate;
 
        /**
@@ -239,6 +248,16 @@ public class GenericProduct implements Product {
                this.productId = productId;
        }
 
+       @Override
+       public BasicData getProductManfacturer () {
+               return this.productManfacturer;
+       }
+
+       @Override
+       public void setProductManfacturer (final BasicData productManfacturer) {
+               this.productManfacturer = productManfacturer;
+       }
+
        @Override
        public Float getProductNetPrice () {
                return this.productNetPrice;
index 4c54466214da8d99057fcedb2f42e33e198c63cd..0dfcf7a12cdf2487a3da90cdbc52555e4cf38dc5 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.jproduct.model.product;
 
 import java.io.Serializable;
 import java.util.Date;
+import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
 import org.mxchange.jproduct.model.category.Category;
 
 /**
@@ -83,6 +84,20 @@ public interface Product extends Serializable {
         */
        void setProductId (final Long productId);
 
+       /**
+        * Getter for manufacturing/producing company
+        * <p>
+        * @return Manufacturing/producing company
+        */
+       BasicData getProductManfacturer ();
+
+       /**
+        * Setter for manufacturing/producing company
+        * <p>
+        * @param productManfacturer Manufacturing/producing company
+        */
+       void setProductManfacturer (final BasicData productManfacturer);
+
        /**
         * Getter for product's net price
         * <p>