From 6b9f17d0a9ac8377e24651fb9f48e2d3ce7de94e Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 7 Sep 2015 20:47:39 +0200 Subject: [PATCH] =?utf8?q?Continued:=20-=20updated=20jcore.jar=20-=20got?= =?utf8?q?=20rid=20of=20some=20things=20that=20don't=20work=20in=20EJB=20c?= =?utf8?q?ontainer=20...=20:-(=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/jcore.jar | Bin 29138 -> 29128 bytes src/org/mxchange/jshopcore/BaseShopCore.java | 48 ------------------ src/org/mxchange/jshopcore/ShopInterface.java | 37 -------------- .../CategoryTitleAlreadyUsedException.java | 2 +- .../ProductTitleAlreadyUsedException.java | 2 +- .../jshopcore/model/basket/BaseBasket.java | 8 +-- .../jshopcore/model/basket/Basket.java | 4 +- .../model/basket/item/ItemBasket.java | 2 +- .../model/category/BaseCategory.java | 24 ++++----- .../jshopcore/model/category/Category.java | 4 +- .../model/item/AddableBasketItem.java | 15 +++++- .../jshopcore/model/item/BaseItem.java | 42 +++++++++++---- .../jshopcore/model/product/BaseProduct.java | 24 ++++----- .../jshopcore/model/product/Product.java | 4 +- .../model/product/generic/GenericProduct.java | 1 + 15 files changed, 83 insertions(+), 134 deletions(-) delete mode 100644 src/org/mxchange/jshopcore/BaseShopCore.java delete mode 100644 src/org/mxchange/jshopcore/ShopInterface.java diff --git a/lib/jcore.jar b/lib/jcore.jar index 636db5cb817c5a8422435600d1eaa83f399dcde9..1e4a78b02a1d9abd48a4b7cb5e7a53a763af1d77 100644 GIT binary patch delta 4654 zcmZ`-3wTt;75?Y$Zg#V|Nj95of*~OrFbUa20t5mW9!ZRWkPsq4NqCfiN)sSJs$fNA z!M2K}TEf_(!BTnJ3jK;M2@gfEQo(910ZSj$wiaK7N^7yU1^U@@W;dIgx7^8~gv3_O?df+eXC zaVSC}Mq&U)V+cy*9B&r+eaM@C)2*0Q z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d)f8!U;DU~e_)Nz?*!&Zp$^5BR zxnIUzI{w9wx8mOpe6HgXF6($2n;rO%j{ic+E6st>k*RC7AaW>U)1gr=%itkTifGYl zELnL{tvm@=p0q1Z@|7p?%9DQODFw=tTIETw@}yaLlC3<+ARo{;1*(FwpghS3QqnjB zRQ3}+nl{=|jq-e%cXA&rKT*vVlTCt!?0wW^HEqlXXv<&Sd^(ok7AgszQPsJ$yiF{Y zz2#X!Zk4TiHbz)O1?xMNat%mT0TSZyg)vO4( z(H3SR*U#{c83f*M3cMl=EMJ{5EXZxcC`Sq9SR53dbJo{xs@HAQ`?4u)M?`O|+#u<7 z8}+_POx}vagjXFiS!v3|V`TE4DU(%ECi49oyfHcWkdQx$gUsukkvmP1hZ>PTHAU`< zA`ebE=U}KY2bYM+bM60_kG)yNPvF-V!wy`IU3i9%X! zs(FM_^8!=o2cnw8lI7&eq`@5^nn>x=7<_va-_GY1;k)@bWTo`xh<)pgG~&0K;s*`* z{LIf1$Oo7*!Oa{$G zjuH3Agu5pWE+5y7yY~NAMUW1|Tw@CQO_@Am&Lr2!vZ_%*|+_*pPz=EWKKwTwE6|B&bNnZW_vh#qyTw@SP}p+o*_$7=Z$;M-M^sO~?X~ zPOpLukP$AiuY$2WQp^QNT#C&~WITb5_)etrdb%jFkP@Pq=J}%a@D!vsS_1V4k>B%5kP z&y(vLt$}__5eRGkk_N5~R~%&yTJR&P*X(mKRO~5niuI$8j zqY0f*uks0ahQiv1X`A7&_QGljVf0{j!?)uswV-U!hLj0{-%12DJd5X)-!}Mr1APrw z)>`fABe=F;Z0S>9UB?(xpI?|R aXLWg^36o7-KJ8pnG}hadVfVCfxBmh3. - */ -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 { /** -- 2.39.5