From: Roland Haeder Date: Thu, 10 Sep 2015 06:44:03 +0000 (+0200) Subject: Updated jcoreee.jar X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5b55acd09af91c24ba235525569bd1a0e8f8bdd4;p=jshop-core.git Updated jcoreee.jar Signed-off-by:Roland Häder --- diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar index 15f194f..963ff76 100644 Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ diff --git a/src/org/mxchange/jshopcore/model/basket/BaseBasket.java b/src/org/mxchange/jshopcore/model/basket/BaseBasket.java index 1110c43..293e521 100644 --- a/src/org/mxchange/jshopcore/model/basket/BaseBasket.java +++ b/src/org/mxchange/jshopcore/model/basket/BaseBasket.java @@ -16,11 +16,7 @@ */ 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 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 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 implements Basket< } @Override - @SuppressWarnings("unchecked") public Map getAll () { - // Trace message - this.getLogger().logTrace("CALLED!"); //NOI18N - // Init map // TODO: Map map = ((BasketFrontend) this.getFrontend()).getAll(); Map map = null; - // Trace message - this.getLogger().logTrace("map=" + map); //NOI18N - // Return it return map; } @@ -117,9 +88,6 @@ public abstract class BaseBasket 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 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; - } } diff --git a/src/org/mxchange/jshopcore/model/category/BaseCategory.java b/src/org/mxchange/jshopcore/model/category/BaseCategory.java index 3ddcd4f..fe5f491 100644 --- a/src/org/mxchange/jshopcore/model/category/BaseCategory.java +++ b/src/org/mxchange/jshopcore/model/category/BaseCategory.java @@ -16,11 +16,7 @@ */ 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 { */ 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 { */ @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 { public void setTitle (final String title) { this.title = title; } - - /** - * Getter for logger - * - * @return Logger instance - */ - private LoggerBeanLocal getLogger () { - return this.logger; - } } diff --git a/src/org/mxchange/jshopcore/model/item/BaseItem.java b/src/org/mxchange/jshopcore/model/item/BaseItem.java index e539d5a..b788238 100644 --- a/src/org/mxchange/jshopcore/model/item/BaseItem.java +++ b/src/org/mxchange/jshopcore/model/item/BaseItem.java @@ -16,11 +16,7 @@ */ 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 { + /** * Serial number */ @@ -61,26 +58,13 @@ public abstract class BaseItem implements AddableBasketItem, Comparable { + /** * Serial number */ @@ -47,26 +44,13 @@ public abstract class BaseProduct implements Product, Comparable { */ 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 { // 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 { public void setTitle (final String title) { this.title = title; } - - /** - * Getter for logger - * - * @return Logger instance - */ - protected LoggerBeanLocal getLogger () { - return this.logger; - } } diff --git a/src/org/mxchange/jshopcore/model/product/GenericProduct.java b/src/org/mxchange/jshopcore/model/product/GenericProduct.java index 8ff19c4..ecd215a 100644 --- a/src/org/mxchange/jshopcore/model/product/GenericProduct.java +++ b/src/org/mxchange/jshopcore/model/product/GenericProduct.java @@ -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);