this();
// Validate all parameters
- if (null == productAvailability) {
+ if (null == productI18nKey) {
// Throw NPE
- throw new NullPointerException("productAvailability is null"); //NOI18N
- } else if (null == productCategory) {
- // Throw it again
- throw new NullPointerException("productCategory is null"); //NOI18N
- } else if (productCategory.getCategoryId() == null) {
+ throw new NullPointerException("productI18nKey is null"); //NOI18N
+ } else if (productI18nKey.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("productI18nKey is empty"); //NOI18N
+ } else if (null == productGrossPrice) {
// Throw it again
- throw new NullPointerException("productCategory.categoryId is null"); //NOI18N
- } else if (productCategory.getCategoryId() < 1) {
+ throw new NullPointerException("productGrossPrice is null"); //NOI18N
+ } else if (productGrossPrice.longValue() < 0) {
// Throw IAE
- throw new IllegalArgumentException(MessageFormat.format("productCategory.categoryId={0} is invalid", productCategory.getCategoryId())); //NOI18N
+ throw new IllegalArgumentException(MessageFormat.format("productGrossPrice={0} is invalid. Do not enter discounts as products.", productGrossPrice)); //NOI18N
} else if (null == productCurrencyCode) {
// Throw it again
throw new NullPointerException("productCurrencyCode is null"); //NOI18N
} else if (productCurrencyCode.isEmpty()) {
// Throw IAE
throw new IllegalArgumentException("productCurrencyCode is empty"); //NOI18N
- } else if (null == productGrossPrice) {
+ } else if (null == productCategory) {
// Throw it again
- throw new NullPointerException("productGrossPrice is null"); //NOI18N
- } else if (productGrossPrice.longValue() < 0) {
- // Throw IAE
- throw new IllegalArgumentException(MessageFormat.format("productGrossPrice={0} is invalid. Do not enter discounts as products.", productGrossPrice)); //NOI18N
- } else if (null == productI18nKey) {
+ throw new NullPointerException("productCategory is null"); //NOI18N
+ } else if (productCategory.getCategoryId() == null) {
+ // Throw it again
+ throw new NullPointerException("productCategory.categoryId is null"); //NOI18N
+ } else if (null == productAvailability) {
// Throw NPE
- throw new NullPointerException("productI18nKey is null"); //NOI18N
- } else if (productI18nKey.isEmpty()) {
+ throw new NullPointerException("productAvailability is null"); //NOI18N
+ } else if (productCategory.getCategoryId() < 1) {
// Throw IAE
- throw new IllegalArgumentException("productI18nKey is empty"); //NOI18N
+ throw new IllegalArgumentException(MessageFormat.format("productCategory.categoryId={0} is invalid", productCategory.getCategoryId())); //NOI18N
} else if (null == productUnitAmount) {
// Throw it again
throw new NullPointerException("productUnitAmount is null"); //NOI18N
int hash = 7;
hash = 23 * hash + Objects.hashCode(this.getProductAgeGroup());
+ hash = 23 * hash + Objects.hashCode(this.getProductAvailability());
hash = 23 * hash + Objects.hashCode(this.getProductBarCodeNumber());
hash = 23 * hash + Objects.hashCode(this.getProductCategory());
hash = 23 * hash + Objects.hashCode(this.getProductCurrencyCode());