From: Roland Haeder Date: Mon, 7 Sep 2015 18:47:39 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6b9f17d0a9ac8377e24651fb9f48e2d3ce7de94e;p=jproduct-core.git Continued: - updated jcore.jar - got rid of some things that don't work in EJB container ... :-( Signed-off-by:Roland Häder --- diff --git a/lib/jcore.jar b/lib/jcore.jar index 636db5c..1e4a78b 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/src/org/mxchange/jshopcore/BaseShopCore.java b/src/org/mxchange/jshopcore/BaseShopCore.java deleted file mode 100644 index fe407a6..0000000 --- a/src/org/mxchange/jshopcore/BaseShopCore.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2015 Roland Haeder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.mxchange.jshopcore; - -import org.mxchange.jcore.BaseFrameworkSystem; -import org.mxchange.jshopcore.model.product.Product; - -/** - * A general shop class - * - * @author Roland Haeder - */ -public class BaseShopCore extends BaseFrameworkSystem implements ShopInterface { - /** - * Item instance - */ - private Product product; - - /** - * @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; - } -} diff --git a/src/org/mxchange/jshopcore/ShopInterface.java b/src/org/mxchange/jshopcore/ShopInterface.java deleted file mode 100644 index d2813e5..0000000 --- a/src/org/mxchange/jshopcore/ShopInterface.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2015 Roland Haeder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.mxchange.jshopcore; - -import org.mxchange.jcore.FrameworkInterface; -import org.mxchange.jshopcore.model.product.Product; - -/** - * A general shop interface - * - * @author Roland Haeder - */ -public interface ShopInterface extends FrameworkInterface { - /** - * @return the product - */ - public Product getProduct (); - - /** - * @param product the product to set - */ - public void setProduct (final Product product); -} diff --git a/src/org/mxchange/jshopcore/exceptions/CategoryTitleAlreadyUsedException.java b/src/org/mxchange/jshopcore/exceptions/CategoryTitleAlreadyUsedException.java index ae81b3c..4936d65 100644 --- a/src/org/mxchange/jshopcore/exceptions/CategoryTitleAlreadyUsedException.java +++ b/src/org/mxchange/jshopcore/exceptions/CategoryTitleAlreadyUsedException.java @@ -28,7 +28,7 @@ public class CategoryTitleAlreadyUsedException extends Exception { /** * Serial number */ - private static final long serialVersionUID = 53751434673262L; + private static final long serialVersionUID = 53_751_434_673_262L; /** * Constructor with HttpServletRequest instance diff --git a/src/org/mxchange/jshopcore/exceptions/ProductTitleAlreadyUsedException.java b/src/org/mxchange/jshopcore/exceptions/ProductTitleAlreadyUsedException.java index 1206661..3191646 100644 --- a/src/org/mxchange/jshopcore/exceptions/ProductTitleAlreadyUsedException.java +++ b/src/org/mxchange/jshopcore/exceptions/ProductTitleAlreadyUsedException.java @@ -28,7 +28,7 @@ public class ProductTitleAlreadyUsedException extends Exception { /** * Serial number */ - private static final long serialVersionUID = 4252734834174L; + private static final long serialVersionUID = 4_252_734_834_174L; /** * Constructor with HttpServletRequest instance diff --git a/src/org/mxchange/jshopcore/model/basket/BaseBasket.java b/src/org/mxchange/jshopcore/model/basket/BaseBasket.java index 9c2b1ae..b019f83 100644 --- a/src/org/mxchange/jshopcore/model/basket/BaseBasket.java +++ b/src/org/mxchange/jshopcore/model/basket/BaseBasket.java @@ -22,7 +22,7 @@ import java.lang.reflect.InvocationTargetException; import java.sql.SQLException; import java.text.MessageFormat; import java.util.Map; -import org.mxchange.jshopcore.BaseShopCore; +import org.mxchange.jcore.BaseFrameworkSystem; import org.mxchange.jshopcore.model.item.AddableBasketItem; /** @@ -31,11 +31,11 @@ import org.mxchange.jshopcore.model.item.AddableBasketItem; * @author Roland Haeder * @param Any instance that implements AddableBasketItem */ -public class BaseBasket extends BaseShopCore implements Basket, Serializable { +public abstract class BaseBasket extends BaseFrameworkSystem implements Basket, Serializable { /** * Serial number */ - private static final long serialVersionUID = 784396762230845717L; + private static final long serialVersionUID = 784_396_762_230_845_717L; /** * Protected constructor with session instance @@ -53,7 +53,7 @@ public class BaseBasket extends BaseShopCore implem this.getLogger().trace("CALLED!"); //NOI18N // Is the bundle initialized? - if (!BaseShopCore.isBundledInitialized()) { + if (!BaseFrameworkSystem.isBundledInitialized()) { // Temporary initialize default bundle // TODO The enum Gender uses this this.initBundle(); diff --git a/src/org/mxchange/jshopcore/model/basket/Basket.java b/src/org/mxchange/jshopcore/model/basket/Basket.java index 97423d7..46af288 100644 --- a/src/org/mxchange/jshopcore/model/basket/Basket.java +++ b/src/org/mxchange/jshopcore/model/basket/Basket.java @@ -21,7 +21,7 @@ import java.io.Serializable; import java.lang.reflect.InvocationTargetException; import java.sql.SQLException; import java.util.Map; -import org.mxchange.jshopcore.ShopInterface; +import org.mxchange.jcore.FrameworkInterface; import org.mxchange.jshopcore.model.item.AddableBasketItem; /** @@ -30,7 +30,7 @@ import org.mxchange.jshopcore.model.item.AddableBasketItem; * @author Roland Haeder * @param Any addable basket items */ -public interface Basket extends Serializable, ShopInterface { +public interface Basket extends FrameworkInterface, Serializable { /** * Adds given item instance to this basket diff --git a/src/org/mxchange/jshopcore/model/basket/item/ItemBasket.java b/src/org/mxchange/jshopcore/model/basket/item/ItemBasket.java index b7dda1f..9cd3c53 100644 --- a/src/org/mxchange/jshopcore/model/basket/item/ItemBasket.java +++ b/src/org/mxchange/jshopcore/model/basket/item/ItemBasket.java @@ -30,7 +30,7 @@ public class ItemBasket extends BaseBasket implements Basket< /** * Serial number */ - private static final long serialVersionUID = 4384123923163957L; + private static final long serialVersionUID = 4_384_123_923_163_957L; /** * Default constructor to be able to throw exceptions from super constructor diff --git a/src/org/mxchange/jshopcore/model/category/BaseCategory.java b/src/org/mxchange/jshopcore/model/category/BaseCategory.java index 493da9b..5588dbe 100644 --- a/src/org/mxchange/jshopcore/model/category/BaseCategory.java +++ b/src/org/mxchange/jshopcore/model/category/BaseCategory.java @@ -19,14 +19,14 @@ package org.mxchange.jshopcore.model.category; import java.io.UnsupportedEncodingException; import java.text.MessageFormat; import java.util.Objects; -import org.mxchange.jshopcore.BaseShopCore; +import org.mxchange.jcore.BaseFrameworkSystem; /** * A general product category class * * @author Roland Haeder */ -public class BaseCategory extends BaseShopCore implements Category { +public abstract class BaseCategory extends BaseFrameworkSystem implements Category { /** * Id number of category @@ -52,9 +52,9 @@ public class BaseCategory extends BaseShopCore implements Category { */ protected BaseCategory (final Long categoryId, final String title, final Long parentId) { // Set all here - this.setCategoryId(categoryId); - this.setTitle(title); - this.setParentId(parentId); + this.categoryId = categoryId; + this.title = title; + this.parentId = parentId; } /** @@ -101,7 +101,7 @@ public class BaseCategory extends BaseShopCore implements Category { * @return Decoded title */ @Override - public final String getDecodedTitle () throws UnsupportedEncodingException { + public String getDecodedTitle () throws UnsupportedEncodingException { // Get title byte[] t = this.getTitle().getBytes(); @@ -115,7 +115,7 @@ public class BaseCategory extends BaseShopCore implements Category { * @return the categoryId */ @Override - public final Long getCategoryId () { + public Long getCategoryId () { return this.categoryId; } @@ -125,7 +125,7 @@ public class BaseCategory extends BaseShopCore implements Category { * @param categoryId the categoryId to set */ @Override - public final void setCategoryId (final Long categoryId) { + public void setCategoryId (final Long categoryId) { this.categoryId = categoryId; } @@ -135,7 +135,7 @@ public class BaseCategory extends BaseShopCore implements Category { * @return the parentId */ @Override - public final Long getParentId () { + public Long getParentId () { return this.parentId; } @@ -145,7 +145,7 @@ public class BaseCategory extends BaseShopCore implements Category { * @param parentId the parentId to set */ @Override - public final void setParentId (final Long parentId) { + public void setParentId (final Long parentId) { this.parentId = parentId; } @@ -155,7 +155,7 @@ public class BaseCategory extends BaseShopCore implements Category { * @return the title */ @Override - public final String getTitle () { + public String getTitle () { return this.title; } @@ -165,7 +165,7 @@ public class BaseCategory extends BaseShopCore implements Category { * @param title the title to set */ @Override - public final void setTitle (final String title) { + public void setTitle (final String title) { this.title = title; } } diff --git a/src/org/mxchange/jshopcore/model/category/Category.java b/src/org/mxchange/jshopcore/model/category/Category.java index a32f8bd..4edbdee 100644 --- a/src/org/mxchange/jshopcore/model/category/Category.java +++ b/src/org/mxchange/jshopcore/model/category/Category.java @@ -17,14 +17,14 @@ package org.mxchange.jshopcore.model.category; import java.io.UnsupportedEncodingException; -import org.mxchange.jshopcore.ShopInterface; +import org.mxchange.jcore.FrameworkInterface; /** * An interface for categories * * @author Roland Haeder */ -public interface Category extends ShopInterface, Comparable { +public interface Category extends FrameworkInterface, Comparable { /** * Id number of category diff --git a/src/org/mxchange/jshopcore/model/item/AddableBasketItem.java b/src/org/mxchange/jshopcore/model/item/AddableBasketItem.java index 8ca2c40..fd75a98 100644 --- a/src/org/mxchange/jshopcore/model/item/AddableBasketItem.java +++ b/src/org/mxchange/jshopcore/model/item/AddableBasketItem.java @@ -16,14 +16,15 @@ */ package org.mxchange.jshopcore.model.item; -import org.mxchange.jshopcore.ShopInterface; +import org.mxchange.jcore.FrameworkInterface; +import org.mxchange.jshopcore.model.product.Product; /** * An interface for addable basket items * * @author Roland Haeder */ -public interface AddableBasketItem extends ShopInterface, Comparable { +public interface AddableBasketItem extends FrameworkInterface, Comparable { /** * Item amount @@ -76,6 +77,16 @@ public interface AddableBasketItem extends ShopInterface, Comparable { +public interface Product extends FrameworkInterface, Comparable { /** * Getter for id number, suitable for form fields. * diff --git a/src/org/mxchange/jshopcore/model/product/generic/GenericProduct.java b/src/org/mxchange/jshopcore/model/product/generic/GenericProduct.java index 7fe9de6..1b5b863 100644 --- a/src/org/mxchange/jshopcore/model/product/generic/GenericProduct.java +++ b/src/org/mxchange/jshopcore/model/product/generic/GenericProduct.java @@ -24,6 +24,7 @@ import org.mxchange.jshopcore.model.product.Product; * Generic product class * * @author Roland Haeder + * TODO: Find a better name */ public class GenericProduct extends BaseProduct implements Product { /**