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;
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
*/
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;
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
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
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;
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);
}
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);
}
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);
}
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);
}