Subversion Repositories SmartDukaan

Rev

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

Rev 23344 Rev 24440
Line 48... Line 48...
48
	private float saleAmount;
48
	private float saleAmount;
49
	
49
	
50
	@Column(name= "selling_price")
50
	@Column(name= "selling_price")
51
	private float sellingPrice;
51
	private float sellingPrice;
52
	
52
	
-
 
53
	@Column(name= "product_name")
-
 
54
	private String productName;
-
 
55
	
-
 
56
	public String getProductName() {
-
 
57
		return productName;
-
 
58
	}
-
 
59
 
-
 
60
	public void setProductName(String productName) {
-
 
61
		this.productName = productName;
-
 
62
	}
-
 
63
 
53
	@Column(name = "serial_number", unique = true)
64
	@Column(name = "serial_number", unique = true)
54
	private String serialNumber;
65
	private String serialNumber;
55
	
66
	
56
	@Column(name = "model_name")
67
	@Column(name = "model_name")
57
	private String modelName;
68
	private String modelName;
Line 290... Line 301...
290
 
301
 
291
	@Override
302
	@Override
292
	public int hashCode() {
303
	public int hashCode() {
293
		final int prime = 31;
304
		final int prime = 31;
294
		int result = 1;
305
		int result = 1;
-
 
306
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
-
 
307
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
308
		result = prime * result + ((customerAddress1 == null) ? 0 : customerAddress1.hashCode());
-
 
309
		result = prime * result + ((customerAddress2 == null) ? 0 : customerAddress2.hashCode());
-
 
310
		result = prime * result + ((customerCity == null) ? 0 : customerCity.hashCode());
-
 
311
		result = prime * result + ((customerDateOfBirth == null) ? 0 : customerDateOfBirth.hashCode());
-
 
312
		result = prime * result + ((customerEmailId == null) ? 0 : customerEmailId.hashCode());
-
 
313
		result = prime * result + ((customerFirstName == null) ? 0 : customerFirstName.hashCode());
-
 
314
		result = prime * result + ((customerLastName == null) ? 0 : customerLastName.hashCode());
-
 
315
		result = prime * result + ((customerMobileNumber == null) ? 0 : customerMobileNumber.hashCode());
-
 
316
		result = prime * result + ((customerPinCode == null) ? 0 : customerPinCode.hashCode());
-
 
317
		result = prime * result + ((customerState == null) ? 0 : customerState.hashCode());
295
		result = prime * result + id;
318
		result = prime * result + id;
-
 
319
		result = prime * result + ((insuranceProvider == null) ? 0 : insuranceProvider.hashCode());
-
 
320
		result = prime * result + ((invoiceCreationTimestamp == null) ? 0 : invoiceCreationTimestamp.hashCode());
-
 
321
		result = prime * result + ((invoiceNumber == null) ? 0 : invoiceNumber.hashCode());
-
 
322
		result = prime * result + ((modelName == null) ? 0 : modelName.hashCode());
-
 
323
		result = prime * result + ((policyNumber == null) ? 0 : policyNumber.hashCode());
-
 
324
		result = prime * result + (posted ? 1231 : 1237);
-
 
325
		result = prime * result + ((productName == null) ? 0 : productName.hashCode());
-
 
326
		result = prime * result + providerId;
-
 
327
		result = prime * result + Float.floatToIntBits(purchaseAmount);
-
 
328
		result = prime * result + retailerId;
-
 
329
		result = prime * result + Float.floatToIntBits(saleAmount);
-
 
330
		result = prime * result + Float.floatToIntBits(sellingPrice);
-
 
331
		result = prime * result + ((serialNumber == null) ? 0 : serialNumber.hashCode());
296
		return result;
332
		return result;
297
	}
333
	}
298
 
334
 
299
	@Override
335
	@Override
300
	public boolean equals(Object obj) {
336
	public boolean equals(Object obj) {
Line 303... Line 339...
303
		if (obj == null)
339
		if (obj == null)
304
			return false;
340
			return false;
305
		if (getClass() != obj.getClass())
341
		if (getClass() != obj.getClass())
306
			return false;
342
			return false;
307
		InsurancePolicy other = (InsurancePolicy) obj;
343
		InsurancePolicy other = (InsurancePolicy) obj;
-
 
344
		if (brand == null) {
-
 
345
			if (other.brand != null)
-
 
346
				return false;
-
 
347
		} else if (!brand.equals(other.brand))
-
 
348
			return false;
-
 
349
		if (createTimestamp == null) {
-
 
350
			if (other.createTimestamp != null)
-
 
351
				return false;
-
 
352
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
353
			return false;
-
 
354
		if (customerAddress1 == null) {
-
 
355
			if (other.customerAddress1 != null)
-
 
356
				return false;
-
 
357
		} else if (!customerAddress1.equals(other.customerAddress1))
-
 
358
			return false;
-
 
359
		if (customerAddress2 == null) {
-
 
360
			if (other.customerAddress2 != null)
-
 
361
				return false;
-
 
362
		} else if (!customerAddress2.equals(other.customerAddress2))
-
 
363
			return false;
-
 
364
		if (customerCity == null) {
-
 
365
			if (other.customerCity != null)
-
 
366
				return false;
-
 
367
		} else if (!customerCity.equals(other.customerCity))
-
 
368
			return false;
-
 
369
		if (customerDateOfBirth == null) {
-
 
370
			if (other.customerDateOfBirth != null)
-
 
371
				return false;
-
 
372
		} else if (!customerDateOfBirth.equals(other.customerDateOfBirth))
-
 
373
			return false;
-
 
374
		if (customerEmailId == null) {
-
 
375
			if (other.customerEmailId != null)
-
 
376
				return false;
-
 
377
		} else if (!customerEmailId.equals(other.customerEmailId))
-
 
378
			return false;
-
 
379
		if (customerFirstName == null) {
-
 
380
			if (other.customerFirstName != null)
-
 
381
				return false;
-
 
382
		} else if (!customerFirstName.equals(other.customerFirstName))
-
 
383
			return false;
-
 
384
		if (customerLastName == null) {
-
 
385
			if (other.customerLastName != null)
-
 
386
				return false;
-
 
387
		} else if (!customerLastName.equals(other.customerLastName))
-
 
388
			return false;
-
 
389
		if (customerMobileNumber == null) {
-
 
390
			if (other.customerMobileNumber != null)
-
 
391
				return false;
-
 
392
		} else if (!customerMobileNumber.equals(other.customerMobileNumber))
-
 
393
			return false;
-
 
394
		if (customerPinCode == null) {
-
 
395
			if (other.customerPinCode != null)
-
 
396
				return false;
-
 
397
		} else if (!customerPinCode.equals(other.customerPinCode))
-
 
398
			return false;
-
 
399
		if (customerState == null) {
-
 
400
			if (other.customerState != null)
-
 
401
				return false;
-
 
402
		} else if (!customerState.equals(other.customerState))
-
 
403
			return false;
308
		if (id != other.id)
404
		if (id != other.id)
309
			return false;
405
			return false;
-
 
406
		if (insuranceProvider == null) {
-
 
407
			if (other.insuranceProvider != null)
-
 
408
				return false;
-
 
409
		} else if (!insuranceProvider.equals(other.insuranceProvider))
-
 
410
			return false;
-
 
411
		if (invoiceCreationTimestamp == null) {
-
 
412
			if (other.invoiceCreationTimestamp != null)
-
 
413
				return false;
-
 
414
		} else if (!invoiceCreationTimestamp.equals(other.invoiceCreationTimestamp))
-
 
415
			return false;
-
 
416
		if (invoiceNumber == null) {
-
 
417
			if (other.invoiceNumber != null)
-
 
418
				return false;
-
 
419
		} else if (!invoiceNumber.equals(other.invoiceNumber))
-
 
420
			return false;
-
 
421
		if (modelName == null) {
-
 
422
			if (other.modelName != null)
-
 
423
				return false;
-
 
424
		} else if (!modelName.equals(other.modelName))
-
 
425
			return false;
-
 
426
		if (policyNumber == null) {
-
 
427
			if (other.policyNumber != null)
-
 
428
				return false;
-
 
429
		} else if (!policyNumber.equals(other.policyNumber))
-
 
430
			return false;
-
 
431
		if (posted != other.posted)
-
 
432
			return false;
-
 
433
		if (productName.equals(other.productName))
-
 
434
			return false;
-
 
435
		if (providerId != other.providerId)
-
 
436
			return false;
-
 
437
		if (Float.floatToIntBits(purchaseAmount) != Float.floatToIntBits(other.purchaseAmount))
-
 
438
			return false;
-
 
439
		if (retailerId != other.retailerId)
-
 
440
			return false;
-
 
441
		if (Float.floatToIntBits(saleAmount) != Float.floatToIntBits(other.saleAmount))
-
 
442
			return false;
-
 
443
		if (Float.floatToIntBits(sellingPrice) != Float.floatToIntBits(other.sellingPrice))
-
 
444
			return false;
-
 
445
		if (serialNumber == null) {
-
 
446
			if (other.serialNumber != null)
-
 
447
				return false;
-
 
448
		} else if (!serialNumber.equals(other.serialNumber))
-
 
449
			return false;
310
		return true;
450
		return true;
311
	}
451
	}
312
 
452
 
313
	@Override
453
	@Override
314
	public String toString() {
454
	public String toString() {
315
		return "InsurancePolicy [id=" + id + ", invoiceNumber=" + invoiceNumber + ", retailerId=" + retailerId
455
		return "InsurancePolicy [id=" + id + ", invoiceNumber=" + invoiceNumber + ", retailerId=" + retailerId
316
				+ ", purchaseAmount=" + purchaseAmount + ", saleAmount=" + saleAmount + ", sellingPrice=" + sellingPrice
456
				+ ", purchaseAmount=" + purchaseAmount + ", saleAmount=" + saleAmount + ", sellingPrice=" + sellingPrice
317
				+ ", serialNumber=" + serialNumber + ", modelName=" + modelName + ", brand=" + brand + ", policyNumber="
457
				+ ", productName=" + productName + ", serialNumber=" + serialNumber + ", modelName=" + modelName
318
				+ policyNumber + ", providerId=" + providerId + ", customerFirstName=" + customerFirstName
458
				+ ", brand=" + brand + ", policyNumber=" + policyNumber + ", providerId=" + providerId
319
				+ ", customerLastName=" + customerLastName + ", customerMobileNumber=" + customerMobileNumber
459
				+ ", customerFirstName=" + customerFirstName + ", customerLastName=" + customerLastName
320
				+ ", customerEmailId=" + customerEmailId + ", customerDateOfBirth=" + customerDateOfBirth
460
				+ ", customerMobileNumber=" + customerMobileNumber + ", customerEmailId=" + customerEmailId
321
				+ ", customerAddress1=" + customerAddress1 + ", customerAddress2=" + customerAddress2
461
				+ ", customerDateOfBirth=" + customerDateOfBirth + ", customerAddress1=" + customerAddress1
322
				+ ", customerCity=" + customerCity + ", customerPinCode=" + customerPinCode + ", customerState="
462
				+ ", customerAddress2=" + customerAddress2 + ", customerCity=" + customerCity + ", customerPinCode="
-
 
463
				+ customerPinCode + ", customerState=" + customerState + ", posted=" + posted + ", insuranceProvider="
323
				+ customerState + ", createTimestamp=" + createTimestamp + ", invoiceCreationTimestamp="
464
				+ insuranceProvider + ", createTimestamp=" + createTimestamp + ", invoiceCreationTimestamp="
324
				+ invoiceCreationTimestamp + "]";
465
				+ invoiceCreationTimestamp + "]";
325
	}
466
	}
326
 
467
 
327
	 
468
	 
328
}
469
}
329
470