Subversion Repositories SmartDukaan

Rev

Rev 20702 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
20424 kshitij.so 1
package com.hotspotstore.model;
2
 
3
import java.util.List;
4
 
5
import com.google.gson.annotations.SerializedName;
6
 
7
 
8
public class ProductPojo {
9
 
10
    private Long id;
11
    @SerializedName(value = "image_url")
12
	private String imageUrl;
20704 kshitij.so 13
    @SerializedName(value = "default_img_url")
14
	private String defaultImageUrl;
15
	private String title;
20424 kshitij.so 16
    private String url;
17
    private String description;
18
    private Double price;
19
    private Double mrp;
20
    private List<ItemPojo> itemPojos;
21
 
22
    @SerializedName(value = "offer_text")
23
    private String offerText;
24
 
25
	public String getImageUrl() {
20704 kshitij.so 26
		return imageUrl;
20424 kshitij.so 27
	}
28
	public void setImageUrl(String imageUrl) {
29
		this.imageUrl = imageUrl;
30
	}
31
	public String getDescription() {
32
		return description;
33
	}
34
	public void setDescription(String description) {
35
		this.description = description;
36
	}
37
	public Double getPrice() {
38
		return price;
39
	}
40
	public void setPrice(Double price) {
41
		this.price = price;
42
	}
43
	public String getOfferText() {
44
		return offerText;
45
	}
46
	public void setOfferText(String offerText) {
47
		this.offerText = offerText;
48
	}
49
	public void setUrl(String url) {
50
		this.url = url;
51
	}
52
	@Override
53
	public int hashCode() {
54
		final int prime = 31;
55
		int result = 1;
56
		result = prime * result
57
				+ ((description == null) ? 0 : description.hashCode());
58
		result = prime * result + ((id == null) ? 0 : id.hashCode());
59
		result = prime * result
60
				+ ((imageUrl == null) ? 0 : imageUrl.hashCode());
61
		result = prime * result + ((mrp == null) ? 0 : mrp.hashCode());
62
		result = prime * result
63
				+ ((offerText == null) ? 0 : offerText.hashCode());
64
		result = prime * result + ((price == null) ? 0 : price.hashCode());
65
		result = prime * result + ((title == null) ? 0 : title.hashCode());
66
		result = prime * result + ((url == null) ? 0 : url.hashCode());
67
		return result;
68
	}
69
	@Override
70
	public boolean equals(Object obj) {
71
		if (this == obj)
72
			return true;
73
		if (obj == null)
74
			return false;
75
		if (getClass() != obj.getClass())
76
			return false;
77
		ProductPojo other = (ProductPojo) obj;
78
		if (description == null) {
79
			if (other.description != null)
80
				return false;
81
		} else if (!description.equals(other.description))
82
			return false;
83
		if (id == null) {
84
			if (other.id != null)
85
				return false;
86
		} else if (!id.equals(other.id))
87
			return false;
88
		if (imageUrl == null) {
89
			if (other.imageUrl != null)
90
				return false;
91
		} else if (!imageUrl.equals(other.imageUrl))
92
			return false;
93
		if (mrp == null) {
94
			if (other.mrp != null)
95
				return false;
96
		} else if (!mrp.equals(other.mrp))
97
			return false;
98
		if (offerText == null) {
99
			if (other.offerText != null)
100
				return false;
101
		} else if (!offerText.equals(other.offerText))
102
			return false;
103
		if (price == null) {
104
			if (other.price != null)
105
				return false;
106
		} else if (!price.equals(other.price))
107
			return false;
108
		if (title == null) {
109
			if (other.title != null)
110
				return false;
111
		} else if (!title.equals(other.title))
112
			return false;
113
		if (url == null) {
114
			if (other.url != null)
115
				return false;
116
		} else if (!url.equals(other.url))
117
			return false;
118
		return true;
119
	}
120
	public String getUrl() {
121
		return url;
122
	}
123
	public void setTitle(String title) {
124
		this.title = title;
125
	}
126
	public String getTitle() {
127
		return title;
128
	}
129
	public void setMrp(Double mrp) {
130
		this.mrp = mrp;
131
	}
132
	public Double getMrp() {
133
		return mrp;
134
	}
135
	public void setId(Long id) {
136
		this.id = id;
137
	}
138
	public Long getId() {
139
		return id;
140
	}
141
	public void setItemPojos(List<ItemPojo> itemPojos) {
142
		this.itemPojos = itemPojos;
143
	}
144
	public List<ItemPojo> getItemPojos() {
145
		return itemPojos;
146
	}
20704 kshitij.so 147
	public String getDefaultImageUrl() {
148
		return "http://staging.profittill.com/app/webroot/timthumb.php?src="+defaultImageUrl+"&h=150&q=100";
149
	}
150
	public void setDefaultImageUrl(String defaultImageUrl) {
151
		this.defaultImageUrl = defaultImageUrl;
152
	}
20424 kshitij.so 153
}