Subversion Repositories SmartDukaan

Rev

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

Rev 24414 Rev 28395
Line 40... Line 40...
40
	
40
	
41
	@Column(name="status")
41
	@Column(name="status")
42
	@Enumerated(EnumType.ORDINAL)
42
	@Enumerated(EnumType.ORDINAL)
43
	private status status;
43
	private status status;
44
	
44
	
-
 
45
	@Column(name = "product_group", length = 100)
-
 
46
	private String productGroup;
-
 
47
	
45
	@Column(name = "model_name", length = 100)
48
	@Column(name = "model_name", length = 100)
46
	private String modelName;
49
	private String modelName;
47
	
50
	
48
	@Column(name = "model_number", length = 100)
51
	@Column(name = "model_number", length = 100)
49
	private String modelNumber;
52
	private String modelNumber;
Line 52... Line 55...
52
	private String color;
55
	private String color;
53
	
56
	
54
	@Column(name="catalog_item_id")
57
	@Column(name="catalog_item_id")
55
	private int catalogItemId;
58
	private int catalogItemId;
56
	
59
	
-
 
60
	
-
 
61
	@Column(name="weight")
-
 
62
	private double weight;
-
 
63
	
57
	@Column(name="category")
64
	@Column(name="category")
58
	private int categoryId;
65
	private int categoryId;
59
	
66
	
60
	public int getCategoryId() {
67
	public int getCategoryId() {
61
		return categoryId;
68
		return categoryId;
Line 72... Line 79...
72
	private String hsnCode;
79
	private String hsnCode;
73
	
80
	
74
	@Column(name = "sellingPrice")
81
	@Column(name = "sellingPrice")
75
	private Float sellingPrice;
82
	private Float sellingPrice;
76
	
83
	
-
 
84
	public String getProductGroup() {
-
 
85
		return productGroup;
-
 
86
	}
-
 
87
	public void setProductGroup(String productGroup) {
-
 
88
		this.productGroup = productGroup;
-
 
89
	}
77
	public int getId() {
90
	public int getId() {
78
		return id;
91
		return id;
79
	}
92
	}
80
	public void setId(int id) {
93
	public void setId(int id) {
81
		this.id = id;
94
		this.id = id;
Line 126... Line 139...
126
	}
139
	}
127
	
140
	
128
	public int getCatalogItemId() {
141
	public int getCatalogItemId() {
129
		return catalogItemId;
142
		return catalogItemId;
130
	}
143
	}
-
 
144
	
-
 
145
	public double getWeight() {
-
 
146
		return weight;
-
 
147
	}
-
 
148
	public void setWeight(double weight) {
-
 
149
		this.weight = weight;
-
 
150
	}
131
	public void setCatalogItemId(int catalogItemId) {
151
	public void setCatalogItemId(int catalogItemId) {
132
		this.catalogItemId = catalogItemId;
152
		this.catalogItemId = catalogItemId;
133
	}
153
	}
134
	
154
	
135
	public Float getSellingPrice() {
155
	public Float getSellingPrice() {
Line 179... Line 199...
179
	
199
	
180
	@Override
200
	@Override
181
	public int hashCode() {
201
	public int hashCode() {
182
		final int prime = 31;
202
		final int prime = 31;
183
		int result = 1;
203
		int result = 1;
-
 
204
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
-
 
205
		result = prime * result + catalogItemId;
-
 
206
		result = prime * result + categoryId;
-
 
207
		result = prime * result + ((color == null) ? 0 : color.hashCode());
-
 
208
		result = prime * result + ((hsnCode == null) ? 0 : hsnCode.hashCode());
184
		result = prime * result + id;
209
		result = prime * result + id;
-
 
210
		result = prime * result + ((modelName == null) ? 0 : modelName.hashCode());
-
 
211
		result = prime * result + ((modelNumber == null) ? 0 : modelNumber.hashCode());
-
 
212
		result = prime * result + ((productGroup == null) ? 0 : productGroup.hashCode());
-
 
213
		result = prime * result + ((sellingPrice == null) ? 0 : sellingPrice.hashCode());
-
 
214
		result = prime * result + ((status == null) ? 0 : status.hashCode());
-
 
215
		result = prime * result + ((type == null) ? 0 : type.hashCode());
-
 
216
		long temp;
-
 
217
		temp = Double.doubleToLongBits(weight);
-
 
218
		result = prime * result + (int) (temp ^ (temp >>> 32));
185
		return result;
219
		return result;
186
	}
220
	}
187
	@Override
221
	@Override
188
	public boolean equals(Object obj) {
222
	public boolean equals(Object obj) {
189
		if (this == obj)
223
		if (this == obj)
Line 191... Line 225...
191
		if (obj == null)
225
		if (obj == null)
192
			return false;
226
			return false;
193
		if (getClass() != obj.getClass())
227
		if (getClass() != obj.getClass())
194
			return false;
228
			return false;
195
		Item other = (Item) obj;
229
		Item other = (Item) obj;
-
 
230
		if (brand == null) {
-
 
231
			if (other.brand != null)
-
 
232
				return false;
-
 
233
		} else if (!brand.equals(other.brand))
-
 
234
			return false;
-
 
235
		if (catalogItemId != other.catalogItemId)
-
 
236
			return false;
-
 
237
		if (categoryId != other.categoryId)
-
 
238
			return false;
-
 
239
		if (color == null) {
-
 
240
			if (other.color != null)
-
 
241
				return false;
-
 
242
		} else if (!color.equals(other.color))
-
 
243
			return false;
-
 
244
		if (hsnCode == null) {
-
 
245
			if (other.hsnCode != null)
-
 
246
				return false;
-
 
247
		} else if (!hsnCode.equals(other.hsnCode))
-
 
248
			return false;
196
		if (id != other.id)
249
		if (id != other.id)
197
			return false;
250
			return false;
-
 
251
		if (modelName == null) {
-
 
252
			if (other.modelName != null)
-
 
253
				return false;
-
 
254
		} else if (!modelName.equals(other.modelName))
-
 
255
			return false;
-
 
256
		if (modelNumber == null) {
-
 
257
			if (other.modelNumber != null)
-
 
258
				return false;
-
 
259
		} else if (!modelNumber.equals(other.modelNumber))
-
 
260
			return false;
-
 
261
		if (productGroup == null) {
-
 
262
			if (other.productGroup != null)
-
 
263
				return false;
-
 
264
		} else if (!productGroup.equals(other.productGroup))
-
 
265
			return false;
-
 
266
		if (sellingPrice == null) {
-
 
267
			if (other.sellingPrice != null)
-
 
268
				return false;
-
 
269
		} else if (!sellingPrice.equals(other.sellingPrice))
-
 
270
			return false;
-
 
271
		if (status != other.status)
-
 
272
			return false;
-
 
273
		if (type != other.type)
-
 
274
			return false;
-
 
275
		if (Double.doubleToLongBits(weight) != Double.doubleToLongBits(other.weight))
-
 
276
			return false;
198
		return true;
277
		return true;
199
	}
278
	}
200
	@Override
279
	@Override
201
	public String toString() {
280
	public String toString() {
202
		return "Item [id=" + id + ", brand=" + brand + ", status=" + status + ", modelName=" + modelName
281
		return "Item [id=" + id + ", brand=" + brand + ", status=" + status + ", productGroup=" + productGroup
203
				+ ", modelNumber=" + modelNumber + ", color=" + color + ", catalogItemId=" + catalogItemId
282
				+ ", modelName=" + modelName + ", modelNumber=" + modelNumber + ", color=" + color + ", catalogItemId="
204
				+ ", categoryId=" + categoryId + ", type=" + type + ", hsnCode=" + hsnCode + ", sellingPrice="
283
				+ catalogItemId + ", weight=" + weight + ", categoryId=" + categoryId + ", type=" + type + ", hsnCode="
205
				+ sellingPrice + "]";
284
				+ hsnCode + ", sellingPrice=" + sellingPrice + "]";
206
	}
285
	}
207
	public status getStatus() {
286
	public status getStatus() {
208
		return status;
287
		return status;
209
	}
288
	}
210
	public void setStatus(status status) {
289
	public void setStatus(status status) {