X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Forg%2Fmxchange%2Fjshopcore%2Fmodel%2Fproduct%2FBaseProduct.java;h=b1704d63b561fe17e7aa4f615102c7f24a727550;hb=82754b37a3ea3ec3b71b67cad59b5c37d09fab77;hp=5faa9bf1cd49f71c089c56986274c6974a86a89a;hpb=bf1e54a2964e53d7454565b3687a78dd41f9cc6c;p=jshop-core.git diff --git a/src/org/mxchange/jshopcore/model/product/BaseProduct.java b/src/org/mxchange/jshopcore/model/product/BaseProduct.java index 5faa9bf..b1704d6 100644 --- a/src/org/mxchange/jshopcore/model/product/BaseProduct.java +++ b/src/org/mxchange/jshopcore/model/product/BaseProduct.java @@ -7,13 +7,19 @@ package org.mxchange.jshopcore.model.product; import java.text.MessageFormat; import java.util.Objects; -import org.mxchange.jshopcore.BaseShopCore; +import org.mxchange.jcoree.BaseEeSystem; /** + * A general product class * * @author Roland Haeder */ -public class BaseProduct extends BaseShopCore implements Product { +public abstract class BaseProduct extends BaseEeSystem implements Product, Comparable { + /** + * Serial number + */ + private static final long serialVersionUID = 48_379_575_267_451L; + /** * Availability of product */ @@ -42,7 +48,7 @@ public class BaseProduct extends BaseShopCore implements Product { @Override public int compareTo (final Product product) { // Trace message - this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N + this.getLogger().logTrace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N // category should not be null if (null == product) { @@ -50,7 +56,7 @@ public class BaseProduct extends BaseShopCore implements Product { } // Debug message - this.getLogger().debug(MessageFormat.format("this.id={0},product.id={1}", this.getItemId(), product.getItemId())); //NOI18N + this.getLogger().logDebug(MessageFormat.format("this.id={0},product.id={1}", this.getItemId(), product.getItemId())); //NOI18N // Is the id the same? if (Objects.equals(this.getItemId(), product.getItemId())) { @@ -66,52 +72,52 @@ public class BaseProduct extends BaseShopCore implements Product { } @Override - public final Boolean getAvailable () { + public Boolean getAvailable () { return this.available; } @Override - public final void setAvailable (final Boolean available) { + public void setAvailable (final Boolean available) { this.available = available; } @Override - public final Long getCategoryId () { + public Long getCategoryId () { return this.categoryId; } @Override - public final void setCategoryId (final Long categoryId) { + public void setCategoryId (final Long categoryId) { this.categoryId = categoryId; } @Override - public final Long getItemId () { + public Long getItemId () { return this.itemId; } @Override - public final void setItemId (final Long itemId) { + public void setItemId (final Long itemId) { this.itemId = itemId; } @Override - public final Float getPrice () { + public Float getPrice () { return this.price; } @Override - public final void setPrice (final Float price) { + public void setPrice (final Float price) { this.price = price; } @Override - public final String getTitle () { + public String getTitle () { return this.title; } @Override - public final void setTitle (final String title) { + public void setTitle (final String title) { this.title = title; } }