Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
28241 amit.gupta 1
package com.spice.profitmandi.dao.model;
2
 
3
public class PaymentOptionModel {
4
	private String paymentMethod;
5
	private String paymentMethodDesctiption;
6
	private double surcharge;
7
	private boolean comingSoon=false;
8
	@Override
9
	public String toString() {
10
		return "PaymentOptionModel [paymentMethod=" + paymentMethod + ", paymentMethodDesctiption="
11
				+ paymentMethodDesctiption + ", surcharge=" + surcharge + ", comingSoon=" + comingSoon + "]";
12
	}
13
	public String getPaymentMethod() {
14
		return paymentMethod;
15
	}
16
 
17
 
18
	public double getSurcharge() {
19
		return surcharge;
20
	}
21
	public void setSurcharge(double surcharge) {
22
		this.surcharge = surcharge;
23
	}
24
	public void setPaymentMethod(String paymentMethod) {
25
		this.paymentMethod = paymentMethod;
26
	}
27
	public String getPaymentMethodDesctiption() {
28
		return paymentMethodDesctiption;
29
	}
30
	public void setPaymentMethodDesctiption(String paymentMethodDesctiption) {
31
		this.paymentMethodDesctiption = paymentMethodDesctiption;
32
	}
33
 
34
 
35
	public boolean isComingSoon() {
36
		return comingSoon;
37
	}
38
	public void setComingSoon(boolean comingSoon) {
39
		this.comingSoon = comingSoon;
40
	}
41
	@Override
42
	public int hashCode() {
43
		final int prime = 31;
44
		int result = 1;
45
		result = prime * result + (comingSoon ? 1231 : 1237);
46
		result = prime * result + ((paymentMethod == null) ? 0 : paymentMethod.hashCode());
47
		result = prime * result + ((paymentMethodDesctiption == null) ? 0 : paymentMethodDesctiption.hashCode());
48
		long temp;
49
		temp = Double.doubleToLongBits(surcharge);
50
		result = prime * result + (int) (temp ^ (temp >>> 32));
51
		return result;
52
	}
53
	@Override
54
	public boolean equals(Object obj) {
55
		if (this == obj)
56
			return true;
57
		if (obj == null)
58
			return false;
59
		if (getClass() != obj.getClass())
60
			return false;
61
		PaymentOptionModel other = (PaymentOptionModel) obj;
62
		if (comingSoon != other.comingSoon)
63
			return false;
64
		if (paymentMethod == null) {
65
			if (other.paymentMethod != null)
66
				return false;
67
		} else if (!paymentMethod.equals(other.paymentMethod))
68
			return false;
69
		if (paymentMethodDesctiption == null) {
70
			if (other.paymentMethodDesctiption != null)
71
				return false;
72
		} else if (!paymentMethodDesctiption.equals(other.paymentMethodDesctiption))
73
			return false;
74
		if (Double.doubleToLongBits(surcharge) != Double.doubleToLongBits(other.surcharge))
75
			return false;
76
		return true;
77
	}
78
 
79
 
80
}
81
 
82