From: Roland Haeder <roland@mxchange.org>
Date: Fri, 4 Sep 2015 17:02:53 +0000 (+0200)
Subject: More no longer used methods removed (they were needed for the TDGP) and more cleanups.
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1646b55417294ac5f6fb9d747f7baab39e87a5c0;p=pizzaservice-ejb.git

More no longer used methods removed (they were needed for the TDGP) and more cleanups.
Signed-off-by:Roland Häder <roland@mxchange.org>
---

diff --git a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java
index 8fb5b2d..9a09d69 100644
--- a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java
+++ b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java
@@ -21,9 +21,9 @@ import java.util.Deque;
 import java.util.Iterator;
 import javax.faces.FacesException;
 import org.mxchange.jshop.beans.FrameworkBean;
-import org.mxchange.jshop.category.Category;
-import org.mxchange.jshop.item.AddableBasketItem;
-import org.mxchange.jshop.product.Product;
+import org.mxchange.jshop.model.category.Category;
+import org.mxchange.jshop.model.item.AddableBasketItem;
+import org.mxchange.jshop.model.product.Product;
 
 /**
  *
diff --git a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java
index 369b1b9..84c1383 100644
--- a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java
+++ b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java
@@ -24,15 +24,12 @@ import java.util.Deque;
 import java.util.Iterator;
 import javax.annotation.PostConstruct;
 import javax.ejb.Stateless;
-import org.mxchange.jcore.exceptions.BadTokenException;
-import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
-import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
 import org.mxchange.jshop.beans.BaseFrameworkBean;
-import org.mxchange.jshop.category.Category;
 import org.mxchange.jshop.exceptions.CategoryTitleAlreadyUsedException;
 import org.mxchange.jshop.exceptions.ProductTitleAlreadyUsedException;
-import org.mxchange.jshop.item.AddableBasketItem;
-import org.mxchange.jshop.product.Product;
+import org.mxchange.jshop.model.category.Category;
+import org.mxchange.jshop.model.item.AddableBasketItem;
+import org.mxchange.jshop.model.product.Product;
 import org.mxchange.pizzaapplication.application.PizzaApplication;
 import org.mxchange.pizzaapplication.application.PizzaServiceApplication;
 
@@ -78,7 +75,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 		try {
 			// Call init method
 			this.app.init();
-		} catch (final UnsupportedDatabaseBackendException | SQLException | IOException | BadTokenException ex) {
+		} catch (final SQLException | IOException ex) {
 			// Continue to throw
 			throw new RuntimeException(ex);
 		}
@@ -94,7 +91,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public Iterator<Product> getAvailableProductsIterator () throws RemoteException {
 		try {
 			return this.app.getAvailableProductsIterator();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new RemoteException("getAvailableProductsIterator() failed.", ex);
 		}
@@ -104,7 +101,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public Iterator<Product> getAllProductsIterator () throws RemoteException {
 		try {
 			return this.app.getAllProductsIterator();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new RemoteException("getAllProductsIterator() failed.", ex);
 		}
@@ -114,7 +111,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public Deque<Product> getAvailableProducts () throws RemoteException {
 		try {
 			return this.app.getAvailableProducts();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new RemoteException("getAvailableProducts() failed.", ex);
 		}
@@ -124,7 +121,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public Deque<Product> getAllProducts () throws RemoteException {
 		try {
 			return this.app.getAllProducts();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new RemoteException("getAllProducts() failed.", ex);
 		}
@@ -134,7 +131,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public Iterator<Category> getAllCategoriesIterator () throws RemoteException {
 		try {
 			return this.app.getAllCategoriesIterator();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new RemoteException("getAllCategoriesIterator() failed.", ex);
 		}
@@ -144,7 +141,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public Deque<Category> getAllCategories () throws RemoteException {
 		try {
 			return this.app.getAllCategories();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new RemoteException("getAllCategories() failed.", ex);
 		}
@@ -154,7 +151,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public void doAdminAddCategory (final Category category) throws RemoteException {
 		try {
 			this.app.doAdminAddCategory(category);
-		} catch (final CategoryTitleAlreadyUsedException | IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final CategoryTitleAlreadyUsedException | IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new RemoteException("doAdminAddCategory() failed.", ex);
 		}
@@ -164,7 +161,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public void doAdminAddProduct (final Product product) throws RemoteException {
 		try {
 			this.app.doAdminAddProduct(product);
-		} catch (final ProductTitleAlreadyUsedException | IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final ProductTitleAlreadyUsedException | IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new RemoteException("doAdminAddProduct() failed.", ex);
 		}
@@ -175,7 +172,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public String getPrintableProduktCategory (final Product product) throws RemoteException {
 		try {
 			return this.app.getPrintableProductCategory(product);
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new RemoteException("getPrintableProduktCategory() failed.", ex);
 		}
@@ -186,7 +183,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public void doAdminHandleProductForms () throws RemoteException {
 		try {
 			this.app.doAdminHandleProductForms();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException | ProductTitleAlreadyUsedException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException | ProductTitleAlreadyUsedException ex) {
 			// Continue to throw
 			throw new RemoteException("doAdminHandleProductForms() failed.", ex);
 		}
@@ -197,7 +194,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 	public void doAdminHandleCategoryForms () throws RemoteException {
 		try {
 			this.app.doAdminHandleCategoryForms();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException | CategoryTitleAlreadyUsedException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException | CategoryTitleAlreadyUsedException ex) {
 			// Continue to throw
 			throw new RemoteException("doAdminHandleCategoryForms() failed.", ex);
 		}
@@ -208,7 +205,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean {
 		try {
 			// Deligate to application
 			return this.app.getProduct(item);
-		} catch (IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new RemoteException("getProduct() failed.", ex);
 		}
diff --git a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/customer/ShopCustomerSessionBean.java b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/customer/ShopCustomerSessionBean.java
index 7ec4c77..5eee244 100644
--- a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/customer/ShopCustomerSessionBean.java
+++ b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/customer/ShopCustomerSessionBean.java
@@ -16,10 +16,7 @@
  */
 package org.mxchange.pizzaapplication.beans.customer;
 
-import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-import java.util.Map;
 import javax.ejb.Stateless;
 import javax.servlet.ServletException;
 import org.mxchange.jcore.client.Client;
@@ -27,7 +24,7 @@ import org.mxchange.jcore.contact.Contact;
 import org.mxchange.jcore.contact.gender.Gender;
 import org.mxchange.jshop.beans.BaseFrameworkBean;
 import org.mxchange.jshop.beans.remote.customer.CustomerSessionBeanRemote;
-import org.mxchange.jshop.customer.ShopCustomer;
+import org.mxchange.jshop.model.customer.ShopCustomer;
 
 /**
  * A customer bean which hides the customer instance
@@ -254,44 +251,11 @@ public class ShopCustomerSessionBean extends BaseFrameworkBean implements Custom
 		throw new UnsupportedOperationException("Not supported yet."); //NOI18N
 	}
 
-	@Override
-	public Iterator<Map.Entry<Field, Object>> iterator () throws ServletException {
-		try {
-			// Deligate to "hidden" object
-			return this.getContact().iterator();
-		} catch (final NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
-			// Continue to throw
-			throw new ServletException(ex);
-		}
-	}
-
 	@Override
 	public void show (final Client client) {
 		throw new UnsupportedOperationException("Not supported yet."); //NOI18N
 	}
 
-	@Override
-	public Object getValueFromColumn (final String columnName) throws ServletException {
-		try {
-			// Deligate to "hidden" object
-			return this.getContact().getValueFromColumn(columnName);
-		} catch (final IllegalArgumentException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
-			// Continue to throw
-			throw new ServletException(ex);
-		}
-	}
-
-	@Override
-	public void setValueFromColumn (final String columnName, final Object value) throws ServletException {
-		try {
-			// Deligate to "hidden" object
-			this.getContact().setValueFromColumn(columnName, value);
-		} catch (final NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
-			// Continue to throw
-			throw new ServletException(ex);
-		}
-	}
-
 	/**
 	 * Setter for Contact instance
 	 * @param contact Contact instance to set
diff --git a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/pizzaservice/PizzaServiceSessionBean.java b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/pizzaservice/PizzaServiceSessionBean.java
index d67ea81..dea48c2 100644
--- a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/pizzaservice/PizzaServiceSessionBean.java
+++ b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/pizzaservice/PizzaServiceSessionBean.java
@@ -23,13 +23,10 @@ import java.util.Deque;
 import javax.annotation.PostConstruct;
 import javax.ejb.Stateless;
 import javax.servlet.ServletException;
-import org.mxchange.jcore.exceptions.BadTokenException;
-import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
-import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
 import org.mxchange.jshop.beans.BaseFrameworkBean;
 import org.mxchange.jshop.beans.remote.shop.ShopSessionBeanRemote;
-import org.mxchange.jshop.category.Category;
-import org.mxchange.jshop.product.Product;
+import org.mxchange.jshop.model.category.Category;
+import org.mxchange.jshop.model.product.Product;
 import org.mxchange.pizzaapplication.application.PizzaApplication;
 import org.mxchange.pizzaapplication.application.PizzaServiceApplication;
 
@@ -75,7 +72,7 @@ public class PizzaServiceSessionBean extends BaseFrameworkBean implements ShopSe
 		try {
 			// Call init method
 			this.app.init();
-		} catch (final UnsupportedDatabaseBackendException | SQLException | IOException | BadTokenException ex) {
+		} catch (final SQLException | IOException ex) {
 			// Continue to throw
 			throw new RuntimeException(ex);
 		}
@@ -85,7 +82,7 @@ public class PizzaServiceSessionBean extends BaseFrameworkBean implements ShopSe
 	public Deque<Product> getAvailableProducts () throws ServletException {
 		try {
 			return this.app.getAvailableProducts();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new ServletException(ex);
 		}
@@ -95,7 +92,7 @@ public class PizzaServiceSessionBean extends BaseFrameworkBean implements ShopSe
 	public Deque<Product> getAllProducts () throws ServletException {
 		try {
 			return this.app.getAllProducts();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new ServletException(ex);
 		}
@@ -105,7 +102,7 @@ public class PizzaServiceSessionBean extends BaseFrameworkBean implements ShopSe
 	public Deque<Category> getAllCategories () throws ServletException {
 		try {
 			return this.app.getAllCategories();
-		} catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+		} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
 			// Continue to throw
 			throw new ServletException(ex);
 		}
diff --git a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java
index a7b826a..3fecb7f 100644
--- a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java
+++ b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java
@@ -24,8 +24,8 @@ import javax.servlet.jsp.tagext.BodyTagSupport;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.mxchange.jshop.beans.basket.BasketBean;
-import org.mxchange.jshop.item.AddableBasketItem;
-import org.mxchange.jshop.product.Product;
+import org.mxchange.jshop.model.item.AddableBasketItem;
+import org.mxchange.jshop.model.product.Product;
 import org.mxchange.pizzaapplication.beans.controller.PizzaBean;
 
 /**