// Get title, price and category id
String title = product.getTitle();
Float price = product.getPrice();
- Long categoryId = product.getCategoryId();
+ Long id = product.getId();
Boolean available = product.getAvailable();
// Debug message
- this.getLogger().debug(MessageFormat.format("title={0},price={1},categoryId={2},available={3}", title, price, categoryId, available)); //NOI18N
+ this.getLogger().debug(MessageFormat.format("title={0},price={1},id={2},available={3}", title, price, id, available)); //NOI18N
// Check all fields
if (null == title) {
} else if (null == price) {
// "price" not set
throw new IllegalArgumentException("product price is not set."); //NOI18N
- } else if (null == categoryId) {
+ } else if (null == id) {
// "title" not set
throw new IllegalArgumentException("product category id is not set."); //NOI18N
- } else if (categoryId == 0) {
+ } else if (id == 0) {
// "title" not set
throw new IllegalArgumentException("product category id is zero."); //NOI18N
} else if (null == available) {