From: Roland Häder Date: Wed, 1 Nov 2017 21:37:17 +0000 (+0100) Subject: Maybe cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4c5b67a47adec2af54878dde7865a08080380b12;p=jfinancials-ejb.git Maybe cherry-pick: - renamed Title to I18nKey Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jproduct/model/category/FinancialsAdminProductCategorySessionBean.java b/src/java/org/mxchange/jproduct/model/category/FinancialsAdminProductCategorySessionBean.java index 2766a5b..aa4483b 100644 --- a/src/java/org/mxchange/jproduct/model/category/FinancialsAdminProductCategorySessionBean.java +++ b/src/java/org/mxchange/jproduct/model/category/FinancialsAdminProductCategorySessionBean.java @@ -63,10 +63,10 @@ public class FinancialsAdminProductCategorySessionBean extends BaseFinancialsPro throw new NullPointerException("category is null"); //NOI18N } else if (category.getCategoryI18nKey() == null) { // Throw it again - throw new NullPointerException("category.categoryTitle is null"); //NOI18N + throw new NullPointerException("category.categoryI18nKey is null"); //NOI18N } else if (category.getCategoryI18nKey().isEmpty()) { // Throw it again - throw new IllegalArgumentException("category.categoryTitle is empty"); //NOI18N + throw new IllegalArgumentException("category.categoryI18nKey is empty"); //NOI18N } else if (category.getCategoryId() != null) { // Throw IAE throw new IllegalArgumentException(MessageFormat.format("category.categoryId={0} is not expected.", category.getCategoryId())); //NOI18N @@ -111,10 +111,10 @@ public class FinancialsAdminProductCategorySessionBean extends BaseFinancialsPro throw new NullPointerException("category is null"); //NOI18N } else if (category.getCategoryI18nKey() == null) { // Throw it again - throw new NullPointerException("category.categoryTitle is null"); //NOI18N + throw new NullPointerException("category.categoryI18nKey is null"); //NOI18N } else if (category.getCategoryI18nKey().isEmpty()) { // Throw it again - throw new IllegalArgumentException("category.categoryTitle is empty"); //NOI18N + throw new IllegalArgumentException("category.categoryI18nKey is empty"); //NOI18N } else if (category.getCategoryId() != null) { // Throw IAE throw new IllegalArgumentException(MessageFormat.format("category.categoryId={0} is not expected.", category.getCategoryId())); //NOI18N diff --git a/src/java/org/mxchange/jproduct/model/product/FinancialsAdminGenericProductSessionBean.java b/src/java/org/mxchange/jproduct/model/product/FinancialsAdminGenericProductSessionBean.java index 3ce7eac..4476756 100644 --- a/src/java/org/mxchange/jproduct/model/product/FinancialsAdminGenericProductSessionBean.java +++ b/src/java/org/mxchange/jproduct/model/product/FinancialsAdminGenericProductSessionBean.java @@ -55,12 +55,12 @@ public class FinancialsAdminGenericProductSessionBean extends BaseFinancialsProd if (null == product) { // Throw NPE throw new NullPointerException("product is null"); //NOI18N - } else if (product.getProductTitle() == null) { + } else if (product.getProductI18nKey() == null) { // Throw it again - throw new NullPointerException("product.productTitle is null"); //NOI18N - } else if (product.getProductTitle().isEmpty()) { + throw new NullPointerException("product.productI18nKey is null"); //NOI18N + } else if (product.getProductI18nKey().isEmpty()) { // Throw it again - throw new IllegalArgumentException("product.productTitle is empty"); //NOI18N + throw new IllegalArgumentException("product.productI18nKey is empty"); //NOI18N } else if (product.getProductId() != null) { // Throw IAE throw new IllegalArgumentException(MessageFormat.format("product.productId={0} is not expected.", product.getProductId())); //NOI18N @@ -124,12 +124,12 @@ public class FinancialsAdminGenericProductSessionBean extends BaseFinancialsProd if (null == product) { // Throw NPE throw new NullPointerException("product is null"); //NOI18N - } else if (product.getProductTitle() == null) { + } else if (product.getProductI18nKey() == null) { // Throw it again - throw new NullPointerException("product.productTitle is null"); //NOI18N - } else if (product.getProductTitle().isEmpty()) { + throw new NullPointerException("product.productI18nKey is null"); //NOI18N + } else if (product.getProductI18nKey().isEmpty()) { // Throw it again - throw new IllegalArgumentException("product.productTitle is empty"); //NOI18N + throw new IllegalArgumentException("product.productI18nKey is empty"); //NOI18N } else if (product.getProductId() != null) { // Throw IAE throw new IllegalArgumentException(MessageFormat.format("product.productId={0} is not expected.", product.getProductId())); //NOI18N @@ -144,7 +144,7 @@ public class FinancialsAdminGenericProductSessionBean extends BaseFinancialsProd // Check each entry for (final Product createdProduct : list) { // Is same name? - if (Objects.equals(createdProduct.getProductTitle(), product.getProductTitle())) { + if (Objects.equals(createdProduct.getProductI18nKey(), product.getProductI18nKey())) { // Found it, then stop here isFound = true; break;