]> git.mxchange.org Git - jproduct-core.git/commitdiff
Updated jcoreee.jar
authorRoland Haeder <roland@mxchange.org>
Thu, 10 Sep 2015 06:44:03 +0000 (08:44 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 10 Sep 2015 07:12:31 +0000 (09:12 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jcoreee.jar
src/org/mxchange/jshopcore/model/basket/BaseBasket.java
src/org/mxchange/jshopcore/model/category/BaseCategory.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

index 15f194f7a91b08159b76c9dc361a56512e5d7865..963ff769842e10dc653a66a7c0a12233947fe660 100644 (file)
Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ
index 1110c43c9f53057fe9b1b9e4c97d683f5470dfb5..293e521b0307fe5138ed00e055265c0ceb733414 100644 (file)
  */
 package org.mxchange.jshopcore.model.basket;
 
-import java.text.MessageFormat;
 import java.util.Map;
-import javax.ejb.EJB;
-import org.mxchange.jcoreeelogger.beans.local.logger.Log;
-import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
 
 /**
  * A general basket class
@@ -34,33 +30,18 @@ public abstract class BaseBasket<T extends AddableBasketItem> implements Basket<
         */
        private static final long serialVersionUID = 782_396_762_230_845_717L;
 
-       /**
-        * Logger instance
-        */
-       @EJB
-       @Log
-       private LoggerBeanLocal logger;
-
        /**
         * Protected constructor with session instance
         */
        protected BaseBasket () {
-               // Trace message
-               this.getLogger().logTrace("CALLED!"); //NOI18N
        }
 
        @Override
        public void init () {
-               // Trace message
-               this.getLogger().logTrace("CALLED!"); //NOI18N
        }
 
        @Override
-       @SuppressWarnings ("unchecked")
        public void addItem (final T item) {
-               // Trace call
-               this.getLogger().logTrace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
-
                // item must not be null
                if (null == item) {
                        // Then abort here
@@ -72,9 +53,6 @@ public abstract class BaseBasket<T extends AddableBasketItem> implements Basket<
 
                // Add item to database
                // TODO: ((BasketFrontend) this.getFrontend()).addItem(item, this.getSessionId());
-
-               // Trace call
-               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        @Override
@@ -85,18 +63,11 @@ public abstract class BaseBasket<T extends AddableBasketItem> implements Basket<
        }
 
        @Override
-       @SuppressWarnings("unchecked")
        public Map<Long, T> getAll () {
-               // Trace message
-               this.getLogger().logTrace("CALLED!"); //NOI18N
-
                // Init map
                // TODO: Map<Long, T> map = ((BasketFrontend) this.getFrontend()).getAll();
                Map<Long, T> map = null;
 
-               // Trace message
-               this.getLogger().logTrace("map=" + map); //NOI18N
-
                // Return it
                return map;
        }
@@ -117,9 +88,6 @@ public abstract class BaseBasket<T extends AddableBasketItem> implements Basket<
 
        @Override
        public boolean isAdded (final T item) {
-               // Trace call
-               this.getLogger().logTrace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
-
                // item must not be null
                if (null == item) {
                        // Then abort here
@@ -130,19 +98,7 @@ public abstract class BaseBasket<T extends AddableBasketItem> implements Basket<
                // TODO: boolean isAdded = ((BasketFrontend) this.getFrontend()).isAdded(item, this.getSessionId());
                boolean isAdded = true;
 
-               // Trace message
-               this.getLogger().logTrace(MessageFormat.format("isAdded={0} - EXIT!", isAdded)); //NOI18N
-
                // Return it
                return isAdded;
        }
-
-       /**
-        * Getter for logger
-        *
-        * @return Logger instance
-        */
-       private LoggerBeanLocal getLogger () {
-               return this.logger;
-       }
 }
index 3ddcd4f9886cb455ebc70fca75de7ce90bdd3138..fe5f491d9558ca5753b9f60e5c4fc04ec29a37b8 100644 (file)
  */
 package org.mxchange.jshopcore.model.category;
 
-import java.text.MessageFormat;
 import java.util.Objects;
-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
@@ -48,13 +44,6 @@ public abstract class BaseCategory implements Category, Comparable<Category> {
         */
        private String title;
 
-       /**
-        * Logger instance
-       */
-       @EJB
-       @Log
-       private LoggerBeanLocal logger;
-
        /**
         * Constructor which accepts all database fields
         *
@@ -83,17 +72,11 @@ public abstract class BaseCategory implements Category, Comparable<Category> {
         */
        @Override
        public int compareTo (final Category category) {
-               // Trace message
-               this.getLogger().logTrace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
-
                // category should not be null
                if (null == category) {
                        throw new NullPointerException("category is null"); //NOI18N
                }
 
-               // Debug message
-               this.getLogger().logDebug(MessageFormat.format("this.id={0},category.id={1}", this.getCategoryId(), category.getCategoryId())); //NOI18N
-
                // Is the categoryId the same?
                if (Objects.equals(this.getCategoryId(), category.getCategoryId())) {
                        // Same categoryId, means same category
@@ -166,13 +149,4 @@ public abstract class BaseCategory implements Category, Comparable<Category> {
        public void setTitle (final String title) {
                this.title = title;
        }
-
-       /**
-        * Getter for logger
-        *
-        * @return Logger instance
-        */
-       private LoggerBeanLocal getLogger () {
-               return this.logger;
-       }
 }
index e539d5adb1eab1da0d8dd8ea054ecd9dfab83cf8..b7882384c48a506bf996e4c8c76faa21a3a64259 100644 (file)
  */
 package org.mxchange.jshopcore.model.item;
 
-import java.text.MessageFormat;
 import java.util.Objects;
-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;
 
@@ -31,6 +27,7 @@ import org.mxchange.jshopcore.model.product.Product;
  * @author Roland Haeder
  */
 public abstract class BaseItem implements AddableBasketItem, Comparable<AddableBasketItem> {
+
        /**
         * Serial number
         */
@@ -61,26 +58,13 @@ public abstract class BaseItem implements AddableBasketItem, Comparable<AddableB
         */
        private Product product;
 
-       /**
-        * Logger instance
-        */
-       @EJB
-       @Log
-       private LoggerBeanLocal logger;
-
        @Override
        public int compareTo (final AddableBasketItem item) {
-               // Trace message
-               this.getLogger().logTrace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
-               
                // item should not be null
                if (null == item) {
                        throw new NullPointerException("item is null"); //NOI18N
                }
 
-               // Debug message
-               this.getLogger().logDebug(MessageFormat.format("this.itemId={0},item.itemId={1}", this.getItemId(), item.getItemId())); //NOI18N
-
                // Is the id the same?
                if (Objects.equals(this.getItemId(), item.getItemId())) {
                        // Same id, means same item
@@ -120,7 +104,7 @@ public abstract class BaseItem implements AddableBasketItem, Comparable<AddableB
        }
 
        @Override
-       public void setItemIdfinal Long itemId) {
+       public void setItemId (final Long itemId) {
                this.itemId = itemId;
        }
 
@@ -143,13 +127,4 @@ public abstract class BaseItem implements AddableBasketItem, Comparable<AddableB
        public void setProduct (final Product product) {
                this.product = product;
        }
-
-       /**
-        * Getter for logger
-        *
-        * @return Logger instance
-        */
-       protected LoggerBeanLocal getLogger () {
-               return this.logger;
-       }
 }
index f4e764b6ca2ae169f51784fc5782304dd94fff14..a56ccc200359c240e34156264066be8ff5b7e09a 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.jshopcore.model.item;
 
-import java.text.MessageFormat;
 import org.mxchange.jshopcore.model.basket.AddableBasketItem;
 import org.mxchange.jshopcore.model.product.Product;
 
@@ -46,9 +45,6 @@ public class BasketItem extends BaseItem implements AddableBasketItem {
                // Call default constructor
                this();
 
-               // Trace message
-               this.getLogger().logDebug(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
-
                // product must not be null
                if (null == product) {
                        // Abort here
index 802a8ec8816937d0976449667c61418eafe7b769..a2fb9b20c5a8808356c2e2a65c68bb6530922daa 100644 (file)
@@ -5,11 +5,7 @@
  */
 package org.mxchange.jshopcore.model.product;
 
-import java.text.MessageFormat;
 import java.util.Objects;
-import javax.ejb.EJB;
-import org.mxchange.jcoreeelogger.beans.local.logger.Log;
-import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
 
 /**
  * A general product class
@@ -17,6 +13,7 @@ import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
  * @author Roland Haeder
  */
 public abstract class BaseProduct implements Product, Comparable<Product> {
+
        /**
         * Serial number
         */
@@ -47,26 +44,13 @@ public abstract class BaseProduct implements Product, Comparable<Product> {
         */
        private String title;
 
-       /**
-        * Logger instance
-        */
-       @EJB
-       @Log
-       private LoggerBeanLocal logger;
-
        @Override
        public int compareTo (final Product product) {
-               // Trace message
-               this.getLogger().logTrace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
-               
                // category should not be null
                if (null == product) {
                        throw new NullPointerException("product is null"); //NOI18N
                }
-               
-               // Debug message
-               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.getId(), product.getId())) {
                        // Same id, means same category
@@ -75,7 +59,7 @@ public abstract class BaseProduct implements Product, Comparable<Product> {
                        // This id is larger than compared to
                        return 1;
                }
-               
+
                // The other id is larger
                return -1;
        }
@@ -129,13 +113,4 @@ public abstract class BaseProduct implements Product, Comparable<Product> {
        public void setTitle (final String title) {
                this.title = title;
        }
-
-       /**
-        * Getter for logger
-        *
-        * @return Logger instance
-        */
-       protected LoggerBeanLocal getLogger () {
-               return this.logger;
-       }
 }
index 8ff19c44a0da3b90ca71790f44222db2eb2eca53..ecd215a1e32b5ef359f9d49ee220e2de78eafaca 100644 (file)
@@ -16,8 +16,6 @@
  */
 package org.mxchange.jshopcore.model.product;
 
-import java.text.MessageFormat;
-
 /**
  * Generic product class
  *
@@ -46,9 +44,6 @@ public class GenericProduct extends BaseProduct implements Product {
         * @param available Availability (selectable by customer)
         */
        public GenericProduct (final Long id, final String title, final Float price, final Long categoryId, final Boolean available) {
-               // Trace message
-               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.setId(id);
                this.setTitle(title);