Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
26522 amit.gupta 1
package com.spice.profitmandi.web.controller.giftcoupon;
2
 
3
public class GiftCard {
4
	String imageUrl;
5
	String title;
6
	float sellingPrice;
7
	int itemId;
8
 
9
	public String getTitle() {
10
		return title;
11
	}
12
	public void setTitle(String title) {
13
		this.title = title;
14
	}
15
	public String getImageUrl() {
16
		return imageUrl;
17
	}
18
	public void setImageUrl(String imageUrl) {
19
		this.imageUrl = imageUrl;
20
	}
21
	public float getSellingPrice() {
22
		return sellingPrice;
23
	}
24
	public void setSellingPrice(float sellingPrice) {
25
		this.sellingPrice = sellingPrice;
26
	}
27
	public int getItemId() {
28
		return itemId;
29
	}
30
	public void setItemId(int itemId) {
31
		this.itemId = itemId;
32
	}
33
	@Override
34
	public int hashCode() {
35
		final int prime = 31;
36
		int result = 1;
37
		result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
38
		result = prime * result + itemId;
39
		result = prime * result + Float.floatToIntBits(sellingPrice);
40
		result = prime * result + ((title == null) ? 0 : title.hashCode());
41
		return result;
42
	}
43
	@Override
44
	public boolean equals(Object obj) {
45
		if (this == obj)
46
			return true;
47
		if (obj == null)
48
			return false;
49
		if (getClass() != obj.getClass())
50
			return false;
51
		GiftCard other = (GiftCard) obj;
52
		if (imageUrl == null) {
53
			if (other.imageUrl != null)
54
				return false;
55
		} else if (!imageUrl.equals(other.imageUrl))
56
			return false;
57
		if (itemId != other.itemId)
58
			return false;
59
		if (Float.floatToIntBits(sellingPrice) != Float.floatToIntBits(other.sellingPrice))
60
			return false;
61
		if (title == null) {
62
			if (other.title != null)
63
				return false;
64
		} else if (!title.equals(other.title))
65
			return false;
66
		return true;
67
	}
68
 
69
 
70
}