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<Product> {
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 48_379_575_267_451L;
+
/**
* Availability of 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) {
}
// 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())) {
}
@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;
}
}