Subversion Repositories SmartDukaan

Rev

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

Rev 26213 Rev 26299
Line 106... Line 106...
106
 
106
 
107
	@OneToOne(fetch = FetchType.LAZY)
107
	@OneToOne(fetch = FetchType.LAZY)
108
	@JoinColumn(name = "purchase_id", insertable = false, updatable = false, nullable = false, referencedColumnName = "id")
108
	@JoinColumn(name = "purchase_id", insertable = false, updatable = false, nullable = false, referencedColumnName = "id")
109
	private Purchase purchase;
109
	private Purchase purchase;
110
 
110
 
111
	@Column(name = "activation_timestamp")
-
 
112
	private LocalDateTime activationTimestamp;
-
 
113
	
111
	
114
	
-
 
115
 
-
 
116
	public LocalDateTime getActivationTimestamp() {
112
	@OneToOne(fetch = FetchType.EAGER)
-
 
113
	@JoinColumn(name = "serial_number", insertable = false, updatable = false, referencedColumnName = "serial_number")
117
		return activationTimestamp;
114
	private ActivatedImei activatedImei;
118
	}
-
 
119
 
115
 
120
	public void setActivationTimestamp(LocalDateTime activationTimestamp) {
-
 
121
		this.activationTimestamp = activationTimestamp;
-
 
122
	}
-
 
123
 
116
 
124
	public void setUnitPrice(float unitPrice) {
117
	public void setUnitPrice(float unitPrice) {
125
		this.unitPrice = unitPrice;
118
		this.unitPrice = unitPrice;
126
	}
119
	}
127
 
120
 
Line 310... Line 303...
310
 
303
 
311
	@Override
304
	@Override
312
	public int hashCode() {
305
	public int hashCode() {
313
		final int prime = 31;
306
		final int prime = 31;
314
		int result = 1;
307
		int result = 1;
315
		result = prime * result + ((activationTimestamp == null) ? 0 : activationTimestamp.hashCode());
308
		result = prime * result + ((activatedImei == null) ? 0 : activatedImei.hashCode());
316
		result = prime * result + badQuantity;
309
		result = prime * result + badQuantity;
317
		result = prime * result + (buyBack ? 1231 : 1237);
310
		result = prime * result + (buyBack ? 1231 : 1237);
318
		result = prime * result + Float.floatToIntBits(cgstRate);
311
		result = prime * result + Float.floatToIntBits(cgstRate);
319
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
312
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
320
		result = prime * result + fofoId;
313
		result = prime * result + fofoId;
Line 344... Line 337...
344
		if (obj == null)
337
		if (obj == null)
345
			return false;
338
			return false;
346
		if (getClass() != obj.getClass())
339
		if (getClass() != obj.getClass())
347
			return false;
340
			return false;
348
		InventoryItem other = (InventoryItem) obj;
341
		InventoryItem other = (InventoryItem) obj;
349
		if (activationTimestamp == null) {
342
		if (activatedImei == null) {
350
			if (other.activationTimestamp != null)
343
			if (other.activatedImei != null)
351
				return false;
344
				return false;
352
		} else if (!activationTimestamp.equals(other.activationTimestamp))
345
		} else if (!activatedImei.equals(other.activatedImei))
353
			return false;
346
			return false;
354
		if (badQuantity != other.badQuantity)
347
		if (badQuantity != other.badQuantity)
355
			return false;
348
			return false;
356
		if (buyBack != other.buyBack)
349
		if (buyBack != other.buyBack)
357
			return false;
350
			return false;
Line 423... Line 416...
423
				+ serialNumber + ", initialQuantity=" + initialQuantity + ", goodQuantity=" + goodQuantity
416
				+ serialNumber + ", initialQuantity=" + initialQuantity + ", goodQuantity=" + goodQuantity
424
				+ ", badQuantity=" + badQuantity + ", lastScanType=" + lastScanType + ", purchaseId=" + purchaseId
417
				+ ", badQuantity=" + badQuantity + ", lastScanType=" + lastScanType + ", purchaseId=" + purchaseId
425
				+ ", unitPrice=" + unitPrice + ", priceDropAmount=" + priceDropAmount + ", buyBack=" + buyBack
418
				+ ", unitPrice=" + unitPrice + ", priceDropAmount=" + priceDropAmount + ", buyBack=" + buyBack
426
				+ ", igstRate=" + igstRate + ", cgstRate=" + cgstRate + ", sgstRate=" + sgstRate + ", hsnCode="
419
				+ ", igstRate=" + igstRate + ", cgstRate=" + cgstRate + ", sgstRate=" + sgstRate + ", hsnCode="
427
				+ hsnCode + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp + ", item="
420
				+ hsnCode + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp + ", item="
428
				+ item + ", purchase=" + purchase + ", activationTimestamp=" + activationTimestamp
421
				+ item + ", purchase=" + purchase + ", activatedImei=" + activatedImei + ", itemDescription="
429
				+ ", itemDescription=" + itemDescription + "]";
422
				+ itemDescription + "]";
430
	}
423
	}
431
 
424
 
432
	@Override
425
	@Override
433
	public int compareTo(Object o) {
426
	public int compareTo(Object o) {
434
		return o.hashCode() - this.hashCode();
427
		return o.hashCode() - this.hashCode();