Subversion Repositories SmartDukaan

Rev

Rev 23364 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23364 Rev 23552
Line 2... Line 2...
2
 
2
 
3
public class CustomPaymentOption {
3
public class CustomPaymentOption {
4
	
4
	
5
	private int paymentOptionId;
5
	private int paymentOptionId;
6
	private float amount;
6
	private float amount;
-
 
7
	private String paymentOption;
-
 
8
	public String getPaymentOption() {
-
 
9
		return paymentOption;
-
 
10
	}
-
 
11
	public void setPaymentOption(String paymentOption) {
-
 
12
		this.paymentOption = paymentOption;
-
 
13
	}
7
	public int getPaymentOptionId() {
14
	public int getPaymentOptionId() {
8
		return paymentOptionId;
15
		return paymentOptionId;
9
	}
16
	}
10
	public void setPaymentOptionId(int paymentOptionId) {
17
	public void setPaymentOptionId(int paymentOptionId) {
11
		this.paymentOptionId = paymentOptionId;
18
		this.paymentOptionId = paymentOptionId;
Line 19... Line 26...
19
	@Override
26
	@Override
20
	public int hashCode() {
27
	public int hashCode() {
21
		final int prime = 31;
28
		final int prime = 31;
22
		int result = 1;
29
		int result = 1;
23
		result = prime * result + Float.floatToIntBits(amount);
30
		result = prime * result + Float.floatToIntBits(amount);
-
 
31
		result = prime * result + ((paymentOption == null) ? 0 : paymentOption.hashCode());
24
		result = prime * result + paymentOptionId;
32
		result = prime * result + paymentOptionId;
25
		return result;
33
		return result;
26
	}
34
	}
27
	@Override
35
	@Override
28
	public boolean equals(Object obj) {
36
	public boolean equals(Object obj) {
Line 33... Line 41...
33
		if (getClass() != obj.getClass())
41
		if (getClass() != obj.getClass())
34
			return false;
42
			return false;
35
		CustomPaymentOption other = (CustomPaymentOption) obj;
43
		CustomPaymentOption other = (CustomPaymentOption) obj;
36
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
44
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
37
			return false;
45
			return false;
-
 
46
		if (paymentOption == null) {
-
 
47
			if (other.paymentOption != null)
-
 
48
				return false;
-
 
49
		} else if (!paymentOption.equals(other.paymentOption))
-
 
50
			return false;
38
		if (paymentOptionId != other.paymentOptionId)
51
		if (paymentOptionId != other.paymentOptionId)
39
			return false;
52
			return false;
40
		return true;
53
		return true;
41
	}
54
	}
42
	@Override
55
	@Override