Subversion Repositories SmartDukaan

Rev

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

Rev 28656 Rev 29575
Line 199... Line 199...
199
	
199
	
200
	@Override
200
	@Override
201
	public int hashCode() {
201
	public int hashCode() {
202
		final int prime = 31;
202
		final int prime = 31;
203
		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());
-
 
209
		result = prime * result + id;
204
		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));
-
 
219
		return result;
205
		return result;
220
	}
206
	}
221
	@Override
207
	@Override
222
	public boolean equals(Object obj) {
208
	public boolean equals(Object obj) {
223
		if (this == obj)
209
		if (this == obj)
Line 225... Line 211...
225
		if (obj == null)
211
		if (obj == null)
226
			return false;
212
			return false;
227
		if (getClass() != obj.getClass())
213
		if (getClass() != obj.getClass())
228
			return false;
214
			return false;
229
		Item other = (Item) obj;
215
		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;
-
 
249
		if (id != other.id)
216
		if (id != other.id)
250
			return false;
217
			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;
-
 
277
		return true;
218
		return true;
278
	}
219
	}
279
	@Override
220
	@Override
280
	public String toString() {
221
	public String toString() {
281
		return "Item [id=" + id + ", brand=" + brand + ", status=" + status + ", productGroup=" + productGroup
222
		return "Item [id=" + id + ", brand=" + brand + ", status=" + status + ", productGroup=" + productGroup