Subversion Repositories SmartDukaan

Rev

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

Rev 29095 Rev 29571
Line 314... Line 314...
314
 
314
 
315
	@Override
315
	@Override
316
	public int hashCode() {
316
	public int hashCode() {
317
		final int prime = 31;
317
		final int prime = 31;
318
		int result = 1;
318
		int result = 1;
319
		result = prime * result + ((activatedTimestamp == null) ? 0 : activatedTimestamp.hashCode());
-
 
320
		result = prime * result + ((activationTimestamp == null) ? 0 : activationTimestamp.hashCode());
-
 
321
		result = prime * result + badQuantity;
-
 
322
		result = prime * result + (buyBack ? 1231 : 1237);
-
 
323
		result = prime * result + Float.floatToIntBits(cgstRate);
-
 
324
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
325
		result = prime * result + fofoId;
-
 
326
		result = prime * result + goodQuantity;
-
 
327
		result = prime * result + ((hsnCode == null) ? 0 : hsnCode.hashCode());
-
 
328
		result = prime * result + id;
319
		result = prime * result + id;
329
		result = prime * result + Float.floatToIntBits(igstRate);
-
 
330
		result = prime * result + initialQuantity;
-
 
331
		result = prime * result + ((item == null) ? 0 : item.hashCode());
-
 
332
		result = prime * result + ((itemDescription == null) ? 0 : itemDescription.hashCode());
-
 
333
		result = prime * result + itemId;
-
 
334
		result = prime * result + ((lastScanType == null) ? 0 : lastScanType.hashCode());
-
 
335
		result = prime * result + Float.floatToIntBits(priceDropAmount);
-
 
336
		result = prime * result + ((purchase == null) ? 0 : purchase.hashCode());
-
 
337
		result = prime * result + purchaseId;
-
 
338
		result = prime * result + ((serialNumber == null) ? 0 : serialNumber.hashCode());
-
 
339
		result = prime * result + Float.floatToIntBits(sgstRate);
-
 
340
		result = prime * result + Float.floatToIntBits(unitPrice);
-
 
341
		result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
-
 
342
		return result;
320
		return result;
343
	}
321
	}
344
 
322
 
345
	@Override
323
	@Override
346
	public boolean equals(Object obj) {
324
	public boolean equals(Object obj) {
Line 349... Line 327...
349
		if (obj == null)
327
		if (obj == null)
350
			return false;
328
			return false;
351
		if (getClass() != obj.getClass())
329
		if (getClass() != obj.getClass())
352
			return false;
330
			return false;
353
		InventoryItem other = (InventoryItem) obj;
331
		InventoryItem other = (InventoryItem) obj;
354
		if (activatedTimestamp == null) {
-
 
355
			if (other.activatedTimestamp != null)
-
 
356
				return false;
-
 
357
		} else if (!activatedTimestamp.equals(other.activatedTimestamp))
-
 
358
			return false;
-
 
359
		if (activationTimestamp == null) {
-
 
360
			if (other.activationTimestamp != null)
-
 
361
				return false;
-
 
362
		} else if (!activationTimestamp.equals(other.activationTimestamp))
-
 
363
			return false;
-
 
364
		if (badQuantity != other.badQuantity)
-
 
365
			return false;
-
 
366
		if (buyBack != other.buyBack)
-
 
367
			return false;
-
 
368
		if (Float.floatToIntBits(cgstRate) != Float.floatToIntBits(other.cgstRate))
-
 
369
			return false;
-
 
370
		if (createTimestamp == null) {
-
 
371
			if (other.createTimestamp != null)
-
 
372
				return false;
-
 
373
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
374
			return false;
-
 
375
		if (fofoId != other.fofoId)
-
 
376
			return false;
-
 
377
		if (goodQuantity != other.goodQuantity)
-
 
378
			return false;
-
 
379
		if (hsnCode == null) {
-
 
380
			if (other.hsnCode != null)
-
 
381
				return false;
-
 
382
		} else if (!hsnCode.equals(other.hsnCode))
-
 
383
			return false;
-
 
384
		if (id != other.id)
332
		if (id != other.id)
385
			return false;
333
			return false;
386
		if (Float.floatToIntBits(igstRate) != Float.floatToIntBits(other.igstRate))
-
 
387
			return false;
-
 
388
		if (initialQuantity != other.initialQuantity)
-
 
389
			return false;
-
 
390
		if (item == null) {
-
 
391
			if (other.item != null)
-
 
392
				return false;
-
 
393
		} else if (!item.equals(other.item))
-
 
394
			return false;
-
 
395
		if (itemDescription == null) {
-
 
396
			if (other.itemDescription != null)
-
 
397
				return false;
-
 
398
		} else if (!itemDescription.equals(other.itemDescription))
-
 
399
			return false;
-
 
400
		if (itemId != other.itemId)
-
 
401
			return false;
-
 
402
		if (lastScanType != other.lastScanType)
-
 
403
			return false;
-
 
404
		if (Float.floatToIntBits(priceDropAmount) != Float.floatToIntBits(other.priceDropAmount))
-
 
405
			return false;
-
 
406
		if (purchase == null) {
-
 
407
			if (other.purchase != null)
-
 
408
				return false;
-
 
409
		} else if (!purchase.equals(other.purchase))
-
 
410
			return false;
-
 
411
		if (purchaseId != other.purchaseId)
-
 
412
			return false;
-
 
413
		if (serialNumber == null) {
-
 
414
			if (other.serialNumber != null)
-
 
415
				return false;
-
 
416
		} else if (!serialNumber.equals(other.serialNumber))
-
 
417
			return false;
-
 
418
		if (Float.floatToIntBits(sgstRate) != Float.floatToIntBits(other.sgstRate))
-
 
419
			return false;
-
 
420
		if (Float.floatToIntBits(unitPrice) != Float.floatToIntBits(other.unitPrice))
-
 
421
			return false;
-
 
422
		if (updateTimestamp == null) {
-
 
423
			if (other.updateTimestamp != null)
-
 
424
				return false;
-
 
425
		} else if (!updateTimestamp.equals(other.updateTimestamp))
-
 
426
			return false;
-
 
427
		return true;
334
		return true;
428
	}
335
	}
429
	
-
 
430
	
-
 
431
 
336
 
432
	public LocalDateTime getActivationTimestamp() {
337
	public LocalDateTime getActivationTimestamp() {
433
		return activationTimestamp;
338
		return activationTimestamp;
434
	}
339
	}
435
 
340