]> git.mxchange.org Git - jcustomer-core.git/blob - src/org/mxchange/jshop/model/item/AddableBasketItem.java
Inital import
[jcustomer-core.git] / src / org / mxchange / jshop / model / item / AddableBasketItem.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.jshop.model.item;
18
19 import org.mxchange.jshop.ShopInterface;
20
21 /**
22  * An interface for addable basket items
23  *
24  * @author Roland Haeder
25  */
26 public interface AddableBasketItem extends ShopInterface, Comparable<AddableBasketItem> {
27
28         /**
29          * Item amount
30          * @return the amount
31          */
32         public Long getAmount ();
33
34         /**
35          * Item amount
36          * @param amount the amount to set
37          */
38         public void setAmount (final Long amount);
39
40         /**
41          * Entry id (from database backend)
42          * @return the id
43          */
44         public Long getId ();
45
46         /**
47          * Entry id (from database backend)
48          * @param id the id to set
49          */
50         public void setId (final Long id);
51
52         /**
53          * @return the id
54          */
55         public Long getItemId ();
56
57         /**
58          * @param id the id to set
59          */
60         public void setItemId (final Long id);
61
62         /**
63          * @return the type
64          */
65         public String getItemType ();
66
67         /**
68          * @param type the type to set
69          */
70         public void setItemType (final String type);
71
72         /**
73          * Calculates total price by multipying amount and single price
74          *
75          * @return Total price of this item
76          */
77         public Float calculateTotalPrice ();
78
79         /**
80          * Compare method
81          * @param item Item to compare to
82          * @return Comparison value
83          */
84         @Override
85         public int compareTo (final AddableBasketItem item);
86 }