From 0ad78bffbd908eb37cf72a6cbc4b76240bb5552a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 25 Apr 2020 20:14:55 +0200 Subject: [PATCH] Continued: - removed no longer used fetchAvailableCategories() as this shall be done in web container - added checked CategoryNotFoundException to method signature - renamed methods according naming-convention MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../model/category/AdminCategorySessionBeanRemote.java | 5 ++++- .../model/category/CategorySessionBeanRemote.java | 2 +- .../jproduct/model/product/ProductSessionBeanRemote.java | 9 +-------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/org/mxchange/jproduct/model/category/AdminCategorySessionBeanRemote.java b/src/org/mxchange/jproduct/model/category/AdminCategorySessionBeanRemote.java index 4c532da..68c6148 100644 --- a/src/org/mxchange/jproduct/model/category/AdminCategorySessionBeanRemote.java +++ b/src/org/mxchange/jproduct/model/category/AdminCategorySessionBeanRemote.java @@ -19,6 +19,7 @@ package org.mxchange.jproduct.model.category; import java.io.Serializable; import javax.ejb.Remote; import org.mxchange.jproduct.exceptions.category.CategoryAlreadyAddedException; +import org.mxchange.jproduct.exceptions.category.CategoryNotFoundException; /** * An interface for categories for "ADMIN" role. @@ -45,7 +46,9 @@ public interface AdminCategorySessionBeanRemote extends Serializable { * @param category Category instance *

* @return Updated category instance + *

+ * @throws CategoryNotFoundException If the given category was not found */ - Category updateProductCategory (final Category category); + Category updateProductCategory (final Category category) throws CategoryNotFoundException; } diff --git a/src/org/mxchange/jproduct/model/category/CategorySessionBeanRemote.java b/src/org/mxchange/jproduct/model/category/CategorySessionBeanRemote.java index 4a886f1..bea0901 100644 --- a/src/org/mxchange/jproduct/model/category/CategorySessionBeanRemote.java +++ b/src/org/mxchange/jproduct/model/category/CategorySessionBeanRemote.java @@ -33,6 +33,6 @@ public interface CategorySessionBeanRemote extends Serializable { *

* @return All categories */ - List allCategories (); + List fetchAllProductCategories (); } diff --git a/src/org/mxchange/jproduct/model/product/ProductSessionBeanRemote.java b/src/org/mxchange/jproduct/model/product/ProductSessionBeanRemote.java index bed31d2..8e26a6b 100644 --- a/src/org/mxchange/jproduct/model/product/ProductSessionBeanRemote.java +++ b/src/org/mxchange/jproduct/model/product/ProductSessionBeanRemote.java @@ -33,13 +33,6 @@ public interface ProductSessionBeanRemote extends Serializable { *

* @return All products */ - List allProducts (); - - /** - * Some "getter" for a linked list of only available products - *

- * @return Only available products - */ - List allAvailableProducts (); + List fetchAllGenericProducts (); } -- 2.39.5