From: Roland Häder Date: Sat, 25 Apr 2020 18:14:55 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0ad78bffbd908eb37cf72a6cbc4b76240bb5552a;p=jproduct-lib.git 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 Signed-off-by: Roland Häder --- 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 (); }