Subversion Repositories SmartDukaan

Rev

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