if (null == category) {
// Throw NPE
throw new NullPointerException("category is null");
- } else if(category.getCategoryTitle() == null) {
+ } else if(category.getCategoryI18nKey() == null) {
// Throw it again
throw new NullPointerException("category.categoryTitle is null");
- } else if (category.getCategoryTitle().isEmpty()) {
+ } else if (category.getCategoryI18nKey().isEmpty()) {
// Throw it again
throw new IllegalArgumentException("category.categoryTitle is empty");
} else if(category.getCategoryId() == null) {
if (null == category) {
// Throw NPE
throw new NullPointerException("category is null"); //NOI18N
- } else if (category.getCategoryTitle() == null) {
+ } else if (category.getCategoryI18nKey() == null) {
// Throw it again
throw new NullPointerException("category.categoryTitle is null"); //NOI18N
- } else if (category.getCategoryTitle().isEmpty()) {
+ } else if (category.getCategoryI18nKey().isEmpty()) {
// Throw it again
throw new IllegalArgumentException("category.categoryTitle is empty"); //NOI18N
} else if (category.getCategoryId() != null) {
if (null == category) {
// Throw NPE
throw new NullPointerException("category is null"); //NOI18N
- } else if (category.getCategoryTitle() == null) {
+ } else if (category.getCategoryI18nKey() == null) {
// Throw it again
throw new NullPointerException("category.categoryTitle is null"); //NOI18N
- } else if (category.getCategoryTitle().isEmpty()) {
+ } else if (category.getCategoryI18nKey().isEmpty()) {
// Throw it again
throw new IllegalArgumentException("category.categoryTitle is empty"); //NOI18N
} else if (category.getCategoryId() != null) {
// Check each entry
for (final Category createdCategory : list) {
// Is same name?
- if (Objects.equals(createdCategory.getCategoryTitle(), category.getCategoryTitle())) {
+ if (Objects.equals(createdCategory.getCategoryI18nKey(), category.getCategoryI18nKey())) {
// Found it, then stop here
isFound = true;
break;