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
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
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
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
// 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;