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 org.mxchange.jcore.FrameworkInterface;
22 * An interface for in database storable products
24 * @author Roland Haeder
26 public interface Product extends FrameworkInterface, Comparable<Product> {
28 * Getter for id number, suitable for form fields.
30 * @return Id number of product
32 public Long getItemId ();
35 * Id number of product
36 * @param id the id number to set
38 public void setItemId (final Long id);
43 * @return Title of product
45 public String getTitle ();
49 * @param title the title to set
51 public void setTitle (final String title);
54 * Getter for raw price.
56 * @return Single price of product
58 public Float getPrice ();
62 * @param price the price to set
64 public void setPrice (final Float price);
67 * Getter for product category id
69 * @return Product category id
71 public Long getCategoryId ();
74 * Setter for product category
76 * @param categoryId Product category
78 public void setCategoryId (final Long categoryId);
81 * Getter for product availability
83 * @return Product availability
85 public Boolean getAvailable ();
88 * Setter for product availability
90 * @param available Product availability
92 public void setAvailable (final Boolean available);
96 * @param product Product to compare to
97 * @return Comparison value
100 public int compareTo (final Product product);