]> git.mxchange.org Git - jcustomer-core.git/blob - src/org/mxchange/jshopcore/model/product/generic/GenericProduct.java
Moved stuff around + added dist.sh
[jcustomer-core.git] / src / org / mxchange / jshopcore / model / product / generic / GenericProduct.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
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.
8  *
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.
13  *
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/>.
16  */
17 package org.mxchange.jshopcore.model.product.generic;
18
19 import java.text.MessageFormat;
20 import org.mxchange.jshopcore.model.product.BaseProduct;
21 import org.mxchange.jshopcore.model.product.Product;
22
23 /**
24  * Generic product class
25  *
26  * @author Roland Haeder
27  */
28 public class GenericProduct extends BaseProduct implements Product {
29         /**
30          * Default constructor
31          */
32         public GenericProduct () {
33         }
34
35         /**
36          * Constructor will all required data
37          *
38          * @param id Id number of product
39          * @param title Name of product
40          * @param price Price
41          * @param categoryId Category id
42          * @param available Availability (selectable by customer)
43          */
44         public GenericProduct (final Long id, final String title, final Float price, final Long categoryId, final Boolean available) {
45                 // Trace message
46                 this.getLogger().trace(MessageFormat.format("id={0},title={1},price={2},categoryId={3},available={4} - CALLED!", id, title, price, categoryId, available)); //NOI18N
47
48                 // Set all here
49                 this.setItemId(id);
50                 this.setTitle(title);
51                 this.setPrice(price);
52                 this.setCategoryId(categoryId);
53                 this.setAvailable(available);
54         }
55 }