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.pizzaapplication.product;
19 import org.mxchange.jcore.database.storage.Storeable;
22 * An interface for in database storeable products
24 * @author Roland Haeder
26 public interface Product extends Storeable, Comparable<Product> {
28 * Getter for id number, suitable for form fields.
30 * @return Id number of product
35 * Id number of product
36 * @param id the id number to set
38 public void setId (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
69 * @return Product category
71 public Long getCategory ();
74 * Setter for product category
76 * @param category Product category
78 public void setCategory (final Long category);
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 category Category to compare to
97 * @return Comparison value
100 public int compareTo (final Product category);