]> git.mxchange.org Git - jproduct-core.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Wed, 9 Sep 2015 20:11:03 +0000 (22:11 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 9 Sep 2015 20:11:03 +0000 (22:11 +0200)
- updated jcore.jar + jcore-ee-logger.jar, jcoreee.jar
- added Java EE API 7.0
- maybe it works this way? :-(

Signed-off-by:Roland Häder <roland@mxchange.org>

16 files changed:
lib/javaee-api-7.0/javaee-api-7.0.jar [new file with mode: 0644]
lib/javaee-api-7.0/javaee-doc-api.jar [new file with mode: 0644]
lib/jcore-ee-logger.jar
lib/jcore.jar
lib/jcoreee.jar
lib/nblibraries.properties
nbproject/project.properties
src/org/mxchange/jshopcore/model/basket/BaseBasket.java
src/org/mxchange/jshopcore/model/category/BaseCategory.java
src/org/mxchange/jshopcore/model/category/Category.java
src/org/mxchange/jshopcore/model/category/ProductCategory.java
src/org/mxchange/jshopcore/model/item/BaseItem.java
src/org/mxchange/jshopcore/model/item/BasketItem.java
src/org/mxchange/jshopcore/model/product/BaseProduct.java
src/org/mxchange/jshopcore/model/product/GenericProduct.java
src/org/mxchange/jshopcore/model/product/Product.java

diff --git a/lib/javaee-api-7.0/javaee-api-7.0.jar b/lib/javaee-api-7.0/javaee-api-7.0.jar
new file mode 100644 (file)
index 0000000..09de736
Binary files /dev/null and b/lib/javaee-api-7.0/javaee-api-7.0.jar differ
diff --git a/lib/javaee-api-7.0/javaee-doc-api.jar b/lib/javaee-api-7.0/javaee-doc-api.jar
new file mode 100644 (file)
index 0000000..bdebe91
Binary files /dev/null and b/lib/javaee-api-7.0/javaee-doc-api.jar differ
index 2fd44525778ddad6faab520733226aa324db45e8..0b6d194d9b6f30825848d1fcb339b4521158b6fb 100644 (file)
Binary files a/lib/jcore-ee-logger.jar and b/lib/jcore-ee-logger.jar differ
index ea3515c96b5fe0ab8f981b9c09375db1f072dacb..54ec8aa1e442410ca76ed01ee3d087eede4a0823 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index 543a51b16610043a6e1c4b9ce0f2033e856b66ab..e78b86d53671343d014cd29f7841d59fb7bc02e6 100644 (file)
Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ
index 6d0afb59d64978f1c42b37eda93de4d6acaa674c..1f1df427e12615ae2880d19c49e1903396a894ce 100644 (file)
@@ -2,3 +2,9 @@ libs.CopyLibs.classpath=\
     ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
 libs.CopyLibs.displayName=CopyLibs Task
 libs.CopyLibs.prop-version=2.0
+libs.javaee-api-7.0.classpath=\
+    ${base}/javaee-api-7.0/javaee-api-7.0.jar
+libs.javaee-api-7.0.displayName=Java EE 7 API Library
+libs.javaee-api-7.0.javadoc=\
+    ${base}/javaee-api-7.0/javaee-doc-api.jar
+libs.javaee-api-7.0.prop-maven-dependencies=javax:javaee-api:7.0:jar
index 7d9b5fea2e60c2dc5dc32879c33f6579812a519a..feebabc9f7d93bb29704ef22d9172bd441d078d9 100644 (file)
@@ -39,7 +39,8 @@ jar.index=${jnlp.enabled}
 javac.classpath=\
     ${file.reference.jcore.jar}:\
     ${reference.jcore-ee-logger.dist}:\
-    ${file.reference.jcoreee.jar}
+    ${file.reference.jcoreee.jar}:\
+    ${libs.javaee-api-7.0.classpath}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
 javac.deprecation=true
index f3afbf7318f1276aac475522a8c38acb3ff7837c..1110c43c9f53057fe9b1b9e4c97d683f5470dfb5 100644 (file)
@@ -18,7 +18,9 @@ package org.mxchange.jshopcore.model.basket;
 
 import java.text.MessageFormat;
 import java.util.Map;
-import org.mxchange.jcoreee.BaseEeSystem;
+import javax.ejb.EJB;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
 
 /**
  * A general basket class
@@ -26,12 +28,19 @@ import org.mxchange.jcoreee.BaseEeSystem;
  * @author Roland Haeder
  * @param <T> Any instance that implements AddableBasketItem
  */
-public abstract class BaseBasket<T extends AddableBasketItem> extends BaseEeSystem implements Basket<T> {
+public abstract class BaseBasket<T extends AddableBasketItem> implements Basket<T> {
        /**
         * Serial number
         */
        private static final long serialVersionUID = 782_396_762_230_845_717L;
 
+       /**
+        * Logger instance
+        */
+       @EJB
+       @Log
+       private LoggerBeanLocal logger;
+
        /**
         * Protected constructor with session instance
         */
@@ -127,4 +136,13 @@ public abstract class BaseBasket<T extends AddableBasketItem> extends BaseEeSyst
                // Return it
                return isAdded;
        }
+
+       /**
+        * Getter for logger
+        *
+        * @return Logger instance
+        */
+       private LoggerBeanLocal getLogger () {
+               return this.logger;
+       }
 }
index ecc6a827fdf32064879b6bf2974dc55993c2a081..3ddcd4f9886cb455ebc70fca75de7ce90bdd3138 100644 (file)
@@ -18,14 +18,16 @@ package org.mxchange.jshopcore.model.category;
 
 import java.text.MessageFormat;
 import java.util.Objects;
-import org.mxchange.jcoreee.BaseEeSystem;
+import javax.ejb.EJB;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
 
 /**
  * A general product category class
  *
  * @author Roland Haeder
  */
-public abstract class BaseCategory extends BaseEeSystem implements Category {
+public abstract class BaseCategory implements Category, Comparable<Category> {
        /**
         * Serial number
         */
@@ -46,6 +48,13 @@ public abstract class BaseCategory extends BaseEeSystem implements Category {
         */
        private String title;
 
+       /**
+        * Logger instance
+       */
+       @EJB
+       @Log
+       private LoggerBeanLocal logger;
+
        /**
         * Constructor which accepts all database fields
         *
@@ -157,4 +166,13 @@ public abstract class BaseCategory extends BaseEeSystem implements Category {
        public void setTitle (final String title) {
                this.title = title;
        }
+
+       /**
+        * Getter for logger
+        *
+        * @return Logger instance
+        */
+       private LoggerBeanLocal getLogger () {
+               return this.logger;
+       }
 }
index 1fb60e81633f2502f3e961bfebc036cc05ce7a8b..d0432fdc88f50b689331764f9971a0b4f2e2a9d0 100644 (file)
@@ -23,7 +23,7 @@ import java.io.Serializable;
  *
  * @author Roland Haeder
  */
-public interface Category extends Comparable<Category>, Serializable {
+public interface Category extends Serializable {
 
        /**
         * Id number of category
@@ -60,12 +60,4 @@ public interface Category extends Comparable<Category>, Serializable {
         * @param title the title to set
         */
        public void setTitle (final String title);
-
-       /**
-        * Compare method
-        * @param category Category to compare to
-        * @return Comparison value
-        */
-       @Override
-       public int compareTo (final Category category);
 }
index cfd56f8830b4934260327ec56d4e2dbf15d6fa46..9bd2a612ee1f396184f056497edf8142f5d776fc 100644 (file)
@@ -16,9 +16,6 @@
  */
 package org.mxchange.jshopcore.model.category;
 
-import org.mxchange.jshopcore.model.category.BaseCategory;
-import org.mxchange.jshopcore.model.category.BaseCategory;
-
 /**
  * A product category
  * @author Roland Haeder
@@ -31,6 +28,7 @@ public class ProductCategory extends BaseCategory {
 
        /**
         * Constructor which accepts all database fields
+        *
         * @param id Id number of database record
         * @param title Category title
         * @param parent Parent id
index d2895c6533a071246e7db34c659f7af2f496f4b8..e539d5adb1eab1da0d8dd8ea054ecd9dfab83cf8 100644 (file)
@@ -18,7 +18,9 @@ package org.mxchange.jshopcore.model.item;
 
 import java.text.MessageFormat;
 import java.util.Objects;
-import org.mxchange.jcoreee.BaseEeSystem;
+import javax.ejb.EJB;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
 import org.mxchange.jshopcore.model.basket.AddableBasketItem;
 import org.mxchange.jshopcore.model.product.Product;
 
@@ -28,7 +30,7 @@ import org.mxchange.jshopcore.model.product.Product;
  *
  * @author Roland Haeder
  */
-public abstract class BaseItem extends BaseEeSystem implements AddableBasketItem, Comparable<AddableBasketItem> {
+public abstract class BaseItem implements AddableBasketItem, Comparable<AddableBasketItem> {
        /**
         * Serial number
         */
@@ -59,6 +61,13 @@ public abstract class BaseItem extends BaseEeSystem implements AddableBasketItem
         */
        private Product product;
 
+       /**
+        * Logger instance
+        */
+       @EJB
+       @Log
+       private LoggerBeanLocal logger;
+
        @Override
        public int compareTo (final AddableBasketItem item) {
                // Trace message
@@ -134,4 +143,13 @@ public abstract class BaseItem extends BaseEeSystem implements AddableBasketItem
        public void setProduct (final Product product) {
                this.product = product;
        }
+
+       /**
+        * Getter for logger
+        *
+        * @return Logger instance
+        */
+       protected LoggerBeanLocal getLogger () {
+               return this.logger;
+       }
 }
index 334179e66a0d9b1d173b2da918fcf8a566c97516..f4e764b6ca2ae169f51784fc5782304dd94fff14 100644 (file)
@@ -56,7 +56,10 @@ public class BasketItem extends BaseItem implements AddableBasketItem {
                }
 
                // Copy all neccessary values
-               this.setItemId(product.getItemId());
+               this.setItemId(product.getId());
                this.setItemType("Product"); //NOI18N
+
+               // Copy instance
+               this.setProduct(product);
        }
 }
index e655ed5506ab90760c6fc21281c76ffd6872f971..802a8ec8816937d0976449667c61418eafe7b769 100644 (file)
@@ -7,14 +7,16 @@ package org.mxchange.jshopcore.model.product;
 
 import java.text.MessageFormat;
 import java.util.Objects;
-import org.mxchange.jcoreee.BaseEeSystem;
+import javax.ejb.EJB;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
 
 /**
  * A general product class
  *
  * @author Roland Haeder
  */
-public abstract class BaseProduct extends BaseEeSystem implements Product, Comparable<Product> {
+public abstract class BaseProduct implements Product, Comparable<Product> {
        /**
         * Serial number
         */
@@ -31,9 +33,9 @@ public abstract class BaseProduct extends BaseEeSystem implements Product, Compa
        private Long categoryId;
 
        /**
-        * Id number of product item
+        * Id number of product
         */
-       private Long itemId;
+       private Long id;
 
        /**
         * Price of product
@@ -45,6 +47,13 @@ public abstract class BaseProduct extends BaseEeSystem implements Product, Compa
         */
        private String title;
 
+       /**
+        * Logger instance
+        */
+       @EJB
+       @Log
+       private LoggerBeanLocal logger;
+
        @Override
        public int compareTo (final Product product) {
                // Trace message
@@ -56,13 +65,13 @@ public abstract class BaseProduct extends BaseEeSystem implements Product, Compa
                }
                
                // Debug message
-               this.getLogger().logDebug(MessageFormat.format("this.id={0},product.id={1}", this.getItemId(), product.getItemId())); //NOI18N
+               this.getLogger().logDebug(MessageFormat.format("this.id={0},product.id={1}", this.getId(), product.getId())); //NOI18N
                
                // Is the id the same?
-               if (Objects.equals(this.getItemId(), product.getItemId())) {
+               if (Objects.equals(this.getId(), product.getId())) {
                        // Same id, means same category
                        return 0;
-               } else if (this.getItemId() > product.getItemId()) {
+               } else if (this.getId() > product.getId()) {
                        // This id is larger than compared to
                        return 1;
                }
@@ -92,13 +101,13 @@ public abstract class BaseProduct extends BaseEeSystem implements Product, Compa
        }
 
        @Override
-       public Long getItemId () {
-               return this.itemId;
+       public Long getId () {
+               return this.id;
        }
 
        @Override
-       public void setItemId (final Long itemId) {
-               this.itemId = itemId;
+       public void setId (final Long id) {
+               this.id = id;
        }
 
        @Override
@@ -120,4 +129,13 @@ public abstract class BaseProduct extends BaseEeSystem implements Product, Compa
        public void setTitle (final String title) {
                this.title = title;
        }
+
+       /**
+        * Getter for logger
+        *
+        * @return Logger instance
+        */
+       protected LoggerBeanLocal getLogger () {
+               return this.logger;
+       }
 }
index 15a40f7202851ef2c3ac496c4d731ff130233090..8ff19c44a0da3b90ca71790f44222db2eb2eca53 100644 (file)
 package org.mxchange.jshopcore.model.product;
 
 import java.text.MessageFormat;
-import org.mxchange.jshopcore.model.product.BaseProduct;
-import org.mxchange.jshopcore.model.product.BaseProduct;
-import org.mxchange.jshopcore.model.product.Product;
-import org.mxchange.jshopcore.model.product.Product;
 
 /**
  * Generic product class
@@ -54,7 +50,7 @@ public class GenericProduct extends BaseProduct implements Product {
                this.getLogger().logTrace(MessageFormat.format("id={0},title={1},price={2},categoryId={3},available={4} - CALLED!", id, title, price, categoryId, available)); //NOI18N
 
                // Set all here
-               this.setItemId(id);
+               this.setId(id);
                this.setTitle(title);
                this.setPrice(price);
                this.setCategoryId(categoryId);
index 96bdca0aa72b28f02a9a7b696a2316b6e8c01713..efcdd7bc4e80d53e1bf0e70cac845d1339c07cd3 100644 (file)
@@ -29,13 +29,13 @@ public interface Product extends Serializable {
         * 
         * @return Id number of product
         */
-       public Long getItemId ();
+       public Long getId ();
 
        /**
         * Id number of product
         * @param id the id number to set
         */
-       public void setItemId (final Long id);
+       public void setId (final Long id);
 
        /**
         * Getter for title.