Subversion Repositories SmartDukaan

Rev

Rev 25953 | Rev 28653 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25953 Rev 26607
Line 1... Line 1...
1
package com.spice.profitmandi.web.req;
1
package com.spice.profitmandi.dao.model;
2
 
2
 
3
public class CartItems
3
public class CartItem
4
{	
4
{	
-
 
5
	
-
 
6
	private long quantity;
-
 
7
	private int itemId;
-
 
8
	private double sellingPrice;
-
 
9
 
5
    public CartItems(long quantity, int itemId) {
10
	public CartItem(long quantity, int itemId) {
6
		super();
11
		super();
7
		this.quantity = quantity;
12
		this.quantity = quantity;
8
		this.itemId = itemId;
13
		this.itemId = itemId;
9
	}
14
	}
10
 
15
 
11
    public CartItems() {
16
    public CartItem() {
12
    	super();
17
    	super();
13
    }
18
    }
14
 
19
 
15
	private long quantity;
-
 
16
	private int itemId;
-
 
17
 
-
 
18
    public long getQuantity() {
20
    public long getQuantity() {
19
		return quantity;
21
		return quantity;
20
	}
22
	}
-
 
23
    
-
 
24
    
-
 
25
 
-
 
26
	@Override
-
 
27
	public int hashCode() {
-
 
28
		final int prime = 31;
-
 
29
		int result = 1;
-
 
30
		result = prime * result + itemId;
-
 
31
		result = prime * result + (int) (quantity ^ (quantity >>> 32));
-
 
32
		long temp;
-
 
33
		temp = Double.doubleToLongBits(sellingPrice);
-
 
34
		result = prime * result + (int) (temp ^ (temp >>> 32));
-
 
35
		return result;
-
 
36
	}
-
 
37
 
-
 
38
	@Override
-
 
39
	public boolean equals(Object obj) {
-
 
40
		if (this == obj)
-
 
41
			return true;
-
 
42
		if (obj == null)
-
 
43
			return false;
-
 
44
		if (getClass() != obj.getClass())
-
 
45
			return false;
-
 
46
		CartItem other = (CartItem) obj;
-
 
47
		if (itemId != other.itemId)
-
 
48
			return false;
-
 
49
		if (quantity != other.quantity)
-
 
50
			return false;
-
 
51
		if (Double.doubleToLongBits(sellingPrice) != Double.doubleToLongBits(other.sellingPrice))
-
 
52
			return false;
-
 
53
		return true;
-
 
54
	}
-
 
55
 
-
 
56
	public double getSellingPrice() {
-
 
57
		return sellingPrice;
-
 
58
	}
-
 
59
 
-
 
60
	public void setSellingPrice(double sellingPrice) {
-
 
61
		this.sellingPrice = sellingPrice;
-
 
62
	}
21
 
63
 
22
	public void setQuantity(long quantity) {
64
	public void setQuantity(long quantity) {
23
		this.quantity = quantity;
65
		this.quantity = quantity;
24
	}
66
	}
25
 
67
 
Line 31... Line 73...
31
		this.itemId = itemId;
73
		this.itemId = itemId;
32
	}
74
	}
33
	
75
	
34
	@Override
76
	@Override
35
	public String toString() {
77
	public String toString() {
36
		return "CartItems [quantity=" + quantity + ", itemId=" + itemId + "]";
78
		return "CartItem [quantity=" + quantity + ", itemId=" + itemId + ", sellingPrice=" + sellingPrice + "]";
37
	}
79
	}
38
 
80
 
39
}
81
}
40
82