2 * Copyright (C) 2015 Roland Haeder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jshopcore.model.product;
19 import java.text.MessageFormat;
20 import org.mxchange.jshopcore.model.product.BaseProduct;
21 import org.mxchange.jshopcore.model.product.BaseProduct;
22 import org.mxchange.jshopcore.model.product.Product;
23 import org.mxchange.jshopcore.model.product.Product;
26 * Generic product class
28 * @author Roland Haeder
29 * TODO: Find a better name
31 public class GenericProduct extends BaseProduct implements Product {
35 private static final long serialVersionUID = 54_578_571_769_283L;
40 public GenericProduct () {
44 * Constructor will all required data
46 * @param id Id number of product
47 * @param title Name of product
49 * @param categoryId Category id
50 * @param available Availability (selectable by customer)
52 public GenericProduct (final Long id, final String title, final Float price, final Long categoryId, final Boolean available) {
54 this.getLogger().logTrace(MessageFormat.format("id={0},title={1},price={2},categoryId={3},available={4} - CALLED!", id, title, price, categoryId, available)); //NOI18N
60 this.setCategoryId(categoryId);
61 this.setAvailable(available);