]> git.mxchange.org Git - jcustomer-core.git/commitdiff
More cleanup
authorRoland Haeder <roland@mxchange.org>
Tue, 8 Sep 2015 13:39:40 +0000 (15:39 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 8 Sep 2015 13:39:40 +0000 (15:39 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

18 files changed:
lib/jcore-ee-logger.jar [new file with mode: 0644]
lib/jcore.jar
lib/jcoreee.jar [new file with mode: 0644]
lib/log4j-api-2.3.jar [deleted file]
lib/log4j-core-2.3.jar [deleted file]
nbproject/project.properties
src/org/mxchange/jshopcore/model/basket/BaseBasket.java
src/org/mxchange/jshopcore/model/basket/Basket.java
src/org/mxchange/jshopcore/model/category/BaseCategory.java
src/org/mxchange/jshopcore/model/category/Category.java
src/org/mxchange/jshopcore/model/category/product/ProductCategory.java
src/org/mxchange/jshopcore/model/customer/ShopCustomer.java
src/org/mxchange/jshopcore/model/item/AddableBasketItem.java
src/org/mxchange/jshopcore/model/item/BaseItem.java
src/org/mxchange/jshopcore/model/item/basket/BasketItem.java
src/org/mxchange/jshopcore/model/product/BaseProduct.java
src/org/mxchange/jshopcore/model/product/Product.java
src/org/mxchange/jshopcore/model/product/generic/GenericProduct.java

diff --git a/lib/jcore-ee-logger.jar b/lib/jcore-ee-logger.jar
new file mode 100644 (file)
index 0000000..b7c4751
Binary files /dev/null and b/lib/jcore-ee-logger.jar differ
index 1e4a78b02a1d9abd48a4b7cb5e7a53a763af1d77..7318d475bd60750789a5af0d8c58471ad7d4f1d8 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar
new file mode 100644 (file)
index 0000000..f479cd8
Binary files /dev/null and b/lib/jcoreee.jar differ
diff --git a/lib/log4j-api-2.3.jar b/lib/log4j-api-2.3.jar
deleted file mode 100644 (file)
index 2a61bbe..0000000
Binary files a/lib/log4j-api-2.3.jar and /dev/null differ
diff --git a/lib/log4j-core-2.3.jar b/lib/log4j-core-2.3.jar
deleted file mode 100644 (file)
index 5438b0b..0000000
Binary files a/lib/log4j-core-2.3.jar and /dev/null differ
index d608ce3707a5629d6ffc1aaadaee5c98e8ecbac3..8b450d2df008a6e4a741b8a2dcf61f2fc92e1ac7 100644 (file)
@@ -30,17 +30,17 @@ dist.jar=${dist.dir}/jshop-core.jar
 dist.javadoc.dir=${dist.dir}/javadoc
 endorsed.classpath=
 excludes=
+file.reference.jcore-ee-logger.jar=lib\\jcore-ee-logger.jar
 file.reference.jcore.jar=lib/jcore.jar
-file.reference.log4j-api-2.3.jar=lib/log4j-api-2.3.jar
-file.reference.log4j-core-2.3.jar=lib/log4j-core-2.3.jar
+file.reference.jcoreee.jar=lib\\jcoreee.jar
 includes=**
 jar.archive.disabled=${jnlp.enabled}
 jar.compress=false
 jar.index=${jnlp.enabled}
 javac.classpath=\
     ${file.reference.jcore.jar}:\
-    ${file.reference.log4j-api-2.3.jar}:\
-    ${file.reference.log4j-core-2.3.jar}
+    ${file.reference.jcore-ee-logger.jar}:\
+    ${file.reference.jcoreee.jar}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
 javac.deprecation=true
@@ -92,6 +92,8 @@ run.test.classpath=\
     ${javac.test.classpath}:\
     ${build.test.classes.dir}
 source.encoding=UTF-8
+source.reference.jcore-ee-logger.jar=../jcore-ee-logger/src/
 source.reference.jcore.jar=../jcore/src/
+source.reference.jcoreee.jar=../jcoreee/src/
 src.dir=src
 test.src.dir=test
index b019f8300a7086ce1de34a24c7a016b527b4c598..9e47ad5576427cc2b2f1fe26b7ebe62de96607cd 100644 (file)
 package org.mxchange.jshopcore.model.basket;
 
 import java.io.IOException;
-import java.io.Serializable;
 import java.lang.reflect.InvocationTargetException;
 import java.sql.SQLException;
 import java.text.MessageFormat;
 import java.util.Map;
-import org.mxchange.jcore.BaseFrameworkSystem;
+import org.mxchange.jcoree.BaseEeSystem;
 import org.mxchange.jshopcore.model.item.AddableBasketItem;
 
 /**
@@ -31,11 +30,11 @@ import org.mxchange.jshopcore.model.item.AddableBasketItem;
  * @author Roland Haeder
  * @param <T> Any instance that implements AddableBasketItem
  */
-public abstract class BaseBasket<T extends AddableBasketItem> extends BaseFrameworkSystem implements Basket<T>, Serializable {
+public abstract class BaseBasket<T extends AddableBasketItem> extends BaseEeSystem implements Basket<T> {
        /**
         * Serial number
         */
-       private static final long serialVersionUID = 784_396_762_230_845_717L;
+       private static final long serialVersionUID = 782_396_762_230_845_717L;
 
        /**
         * Protected constructor with session instance
@@ -44,27 +43,20 @@ public abstract class BaseBasket<T extends AddableBasketItem> extends BaseFramew
         */
        protected BaseBasket () throws SQLException {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
        }
 
        @Override
        public void init () throws SQLException {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
-
-               // Is the bundle initialized?
-               if (!BaseFrameworkSystem.isBundledInitialized()) {
-                       // Temporary initialize default bundle
-                       // TODO The enum Gender uses this
-                       this.initBundle();
-               }
+               this.getLogger().logTrace("CALLED!"); //NOI18N
        }
 
        @Override
        @SuppressWarnings ("unchecked")
        public void addItem (final T item) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Trace call
-               this.getLogger().trace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
 
                // item must not be null
                if (null == item) {
@@ -79,7 +71,7 @@ public abstract class BaseBasket<T extends AddableBasketItem> extends BaseFramew
                // TODO: ((BasketFrontend) this.getFrontend()).addItem(item, this.getSessionId());
 
                // Trace call
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        @Override
@@ -93,14 +85,14 @@ public abstract class BaseBasket<T extends AddableBasketItem> extends BaseFramew
        @SuppressWarnings("unchecked")
        public Map<Long, T> getAll () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               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().trace("map=" + map); //NOI18N
+               this.getLogger().logTrace("map=" + map); //NOI18N
 
                // Return it
                return map;
@@ -123,7 +115,7 @@ public abstract class BaseBasket<T extends AddableBasketItem> extends BaseFramew
        @Override
        public boolean isAdded (final T item) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Trace call
-               this.getLogger().trace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
 
                // item must not be null
                if (null == item) {
@@ -136,7 +128,7 @@ public abstract class BaseBasket<T extends AddableBasketItem> extends BaseFramew
                boolean isAdded = true;
 
                // Trace message
-               this.getLogger().trace(MessageFormat.format("isAdded={0} - EXIT!", isAdded)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("isAdded={0} - EXIT!", isAdded)); //NOI18N
 
                // Return it
                return isAdded;
index 46af28823e7a8292832816b729dd3f153227de93..679200ae0a70a80d8fe38167850453223491170f 100644 (file)
@@ -21,7 +21,6 @@ import java.io.Serializable;
 import java.lang.reflect.InvocationTargetException;
 import java.sql.SQLException;
 import java.util.Map;
-import org.mxchange.jcore.FrameworkInterface;
 import org.mxchange.jshopcore.model.item.AddableBasketItem;
 
 /**
@@ -30,7 +29,7 @@ import org.mxchange.jshopcore.model.item.AddableBasketItem;
  * @author Roland Haeder
  * @param <T> Any addable basket items
  */
-public interface Basket<T extends AddableBasketItem> extends FrameworkInterface, Serializable {
+public interface Basket<T extends AddableBasketItem> extends Serializable {
 
        /**
         * Adds given item instance to this basket
index 5588dbeb15a02700bcd1a02abf72853cb56bf622..e8fe1d93cea51d0dd35375de258cb6022e2f3873 100644 (file)
@@ -19,14 +19,18 @@ package org.mxchange.jshopcore.model.category;
 import java.io.UnsupportedEncodingException;
 import java.text.MessageFormat;
 import java.util.Objects;
-import org.mxchange.jcore.BaseFrameworkSystem;
+import org.mxchange.jcoree.BaseEeSystem;
 
 /**
  * A general product category class
  *
  * @author Roland Haeder
  */
-public abstract class BaseCategory extends BaseFrameworkSystem implements Category {
+public abstract class BaseCategory extends BaseEeSystem implements Category {
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 38_472_937_685_901L;
 
        /**
         * Id number of category
@@ -72,7 +76,7 @@ public abstract class BaseCategory extends BaseFrameworkSystem implements Catego
        @Override
        public int compareTo (final Category category) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
 
                // category should not be null
                if (null == category) {
@@ -80,7 +84,7 @@ public abstract class BaseCategory extends BaseFrameworkSystem implements Catego
                }
 
                // Debug message
-               this.getLogger().debug(MessageFormat.format("this.id={0},category.id={1}", this.getCategoryId(), category.getCategoryId())); //NOI18N
+               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())) {
index 4edbdee9ae100155997969d4ba8679e0a130bb4f..fd775ccc78c02bff5593be06811877cb83fa98fa 100644 (file)
  */
 package org.mxchange.jshopcore.model.category;
 
+import java.io.Serializable;
 import java.io.UnsupportedEncodingException;
-import org.mxchange.jcore.FrameworkInterface;
 
 /**
  * An interface for categories
  *
  * @author Roland Haeder
  */
-public interface Category extends FrameworkInterface, Comparable<Category> {
+public interface Category extends Comparable<Category>, Serializable {
 
        /**
         * Id number of category
index 86b531fc788a7084c5f4b4d4f3a9287831f98316..ad6ef836bb94339c4b144610258780ed65caa55e 100644 (file)
@@ -23,6 +23,11 @@ import org.mxchange.jshopcore.model.category.BaseCategory;
  * @author Roland Haeder
  */
 public class ProductCategory extends BaseCategory {
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 21_458_945_712_659L;
+
        /**
         * Constructor which accepts all database fields
         * @param id Id number of database record
index d0c3e57d1a816c1be43adee12858f6be016a963b..209dd7149fb3b14673e51d607b2b85d8c5f729cc 100644 (file)
@@ -24,4 +24,8 @@ import org.mxchange.jcore.model.contact.BaseContact;
  * @author Roland Haeder
  */
 public class ShopCustomer extends BaseContact implements Customer {
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 4_328_454_581_751L;
 }
index fd75a98312d2c96a83293e2cbd67e0e596b1c8f7..00ea85080e7f4d7ff8d820917c7026aa07dd5692 100644 (file)
@@ -16,7 +16,7 @@
  */
 package org.mxchange.jshopcore.model.item;
 
-import org.mxchange.jcore.FrameworkInterface;
+import java.io.Serializable;
 import org.mxchange.jshopcore.model.product.Product;
 
 /**
@@ -24,7 +24,7 @@ import org.mxchange.jshopcore.model.product.Product;
  *
  * @author Roland Haeder
  */
-public interface AddableBasketItem extends FrameworkInterface, Comparable<AddableBasketItem> {
+public interface AddableBasketItem extends Serializable {
 
        /**
         * Item amount
@@ -86,12 +86,4 @@ public interface AddableBasketItem extends FrameworkInterface, Comparable<Addabl
         * @param product the product to set
         */
        public void setProduct (final Product product);
-
-       /**
-        * Compare method
-        * @param item Item to compare to
-        * @return Comparison value
-        */
-       @Override
-       public int compareTo (final AddableBasketItem item);
 }
index 213ac7fc9f41d3620c91348ca5f63fdc0869f68a..0353d3396cc44481de746f8c6bfd04ef3a6a9475 100644 (file)
@@ -18,7 +18,7 @@ package org.mxchange.jshopcore.model.item;
 
 import java.text.MessageFormat;
 import java.util.Objects;
-import org.mxchange.jcore.BaseFrameworkSystem;
+import org.mxchange.jcoree.BaseEeSystem;
 import org.mxchange.jshopcore.model.product.Product;
 
 /**
@@ -27,7 +27,12 @@ import org.mxchange.jshopcore.model.product.Product;
  *
  * @author Roland Haeder
  */
-public abstract class BaseItem extends BaseFrameworkSystem implements AddableBasketItem {
+public abstract class BaseItem extends BaseEeSystem implements AddableBasketItem, Comparable<AddableBasketItem> {
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 24_348_671_457_829_156L;
+
        /**
         * Entry id (from database backend)
         */
@@ -69,7 +74,7 @@ public abstract class BaseItem extends BaseFrameworkSystem implements AddableBas
        @Override
        public int compareTo (final AddableBasketItem item) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
                
                // item should not be null
                if (null == item) {
@@ -77,7 +82,7 @@ public abstract class BaseItem extends BaseFrameworkSystem implements AddableBas
                }
 
                // Debug message
-               this.getLogger().debug(MessageFormat.format("this.itemId={0},item.itemId={1}", this.getItemId(), item.getItemId())); //NOI18N
+               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())) {
@@ -132,17 +137,11 @@ public abstract class BaseItem extends BaseFrameworkSystem implements AddableBas
                this.itemType = itemType;
        }
 
-       /**
-        * @return the product
-        */
        @Override
        public Product getProduct () {
                return this.product;
        }
 
-       /**
-        * @param product the product to set
-        */
        @Override
        public void setProduct (final Product product) {
                this.product = product;
index 2807023443b88e2b3ea5a1370cbf677b67c39893..217b3aca09a383fb5f7ea43d20b263b2769df04d 100644 (file)
@@ -27,6 +27,11 @@ import org.mxchange.jshopcore.model.product.Product;
  * @author Roland Haeder
  */
 public class BasketItem extends BaseItem implements AddableBasketItem {
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 52_749_158_492_581_578L;
+
        /**
         * Default constructor
         */
@@ -43,7 +48,7 @@ public class BasketItem extends BaseItem implements AddableBasketItem {
                this();
 
                // Trace message
-               this.getLogger().debug(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
+               this.getLogger().logDebug(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
 
                // product must not be null
                if (null == product) {
index e1cc40237e385432a2459f2370e844f7a47c9a6a..b1704d63b561fe17e7aa4f615102c7f24a727550 100644 (file)
@@ -7,13 +7,19 @@ package org.mxchange.jshopcore.model.product;
 
 import java.text.MessageFormat;
 import java.util.Objects;
-import org.mxchange.jcore.BaseFrameworkSystem;
+import org.mxchange.jcoree.BaseEeSystem;
 
 /**
+ * A general product class
  *
  * @author Roland Haeder
  */
-public abstract class BaseProduct extends BaseFrameworkSystem implements Product {
+public abstract class BaseProduct extends BaseEeSystem implements Product, Comparable<Product> {
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 48_379_575_267_451L;
+
        /**
         * Availability of product
         */
@@ -42,7 +48,7 @@ public abstract class BaseProduct extends BaseFrameworkSystem implements Product
        @Override
        public int compareTo (final Product product) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
                
                // category should not be null
                if (null == product) {
@@ -50,7 +56,7 @@ public abstract class BaseProduct extends BaseFrameworkSystem implements Product
                }
                
                // Debug message
-               this.getLogger().debug(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.getItemId(), product.getItemId())); //NOI18N
                
                // Is the id the same?
                if (Objects.equals(this.getItemId(), product.getItemId())) {
index b70a19980d997886b014dff49d8b9ccbe8119bae..96bdca0aa72b28f02a9a7b696a2316b6e8c01713 100644 (file)
  */
 package org.mxchange.jshopcore.model.product;
 
-import org.mxchange.jcore.FrameworkInterface;
+import java.io.Serializable;
 
 /**
  * An interface for in database storable products
  *
  * @author Roland Haeder
  */
-public interface Product extends FrameworkInterface, Comparable<Product> {
+public interface Product extends Serializable {
        /**
         * Getter for id number, suitable for form fields.
         * 
@@ -90,12 +90,4 @@ public interface Product extends FrameworkInterface, Comparable<Product> {
         * @param available Product availability
         */
        public void setAvailable (final Boolean available);
-
-       /**
-        * Compare method
-        * @param product Product to compare to
-        * @return Comparison value
-        */
-       @Override
-       public int compareTo (final Product product);
 }
index 1b5b863b1d1677ab54c4c9c09e0ecdf2e3e3730a..58619f378f576568b5bf725a1ae494538806c557 100644 (file)
@@ -27,6 +27,11 @@ import org.mxchange.jshopcore.model.product.Product;
  * TODO: Find a better name
  */
 public class GenericProduct extends BaseProduct implements Product {
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 54_578_571_769_283L;
+
        /**
         * Default constructor
         */
@@ -44,7 +49,7 @@ public class GenericProduct extends BaseProduct implements Product {
         */
        public GenericProduct (final Long id, final String title, final Float price, final Long categoryId, final Boolean available) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("id={0},title={1},price={2},categoryId={3},available={4} - CALLED!", id, title, price, categoryId, available)); //NOI18N
+               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);