Subversion Repositories SmartDukaan

Rev

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

Rev 25503 Rev 26679
Line 28... Line 28...
28
	private String name;
28
	private String name;
29
	private String description;
29
	private String description;
30
	private SchemeType type;
30
	private SchemeType type;
31
	private AmountType amountType;
31
	private AmountType amountType;
32
	private PartnerType  partnerType;
32
	private PartnerType  partnerType;
-
 
33
	private boolean cashBack;
33
	@Override
34
	@Override
34
	public int hashCode() {
35
	public int hashCode() {
35
		final int prime = 31;
36
		final int prime = 31;
36
		int result = 1;
37
		int result = 1;
37
		result = prime * result + Float.floatToIntBits(amount);
38
		result = prime * result + Float.floatToIntBits(amount);
38
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
39
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
-
 
40
		result = prime * result + (cashBack ? 1231 : 1237);
39
		result = prime * result + ((description == null) ? 0 : description.hashCode());
41
		result = prime * result + ((description == null) ? 0 : description.hashCode());
40
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
42
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
41
		result = prime * result + ((itemIds == null) ? 0 : itemIds.hashCode());
43
		result = prime * result + ((itemIds == null) ? 0 : itemIds.hashCode());
42
		result = prime * result + ((name == null) ? 0 : name.hashCode());
44
		result = prime * result + ((name == null) ? 0 : name.hashCode());
43
		result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());
45
		result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());
44
		result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
46
		result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
45
		result = prime * result + ((type == null) ? 0 : type.hashCode());
47
		result = prime * result + ((type == null) ? 0 : type.hashCode());
46
		return result;
48
		return result;
47
	}
49
	}
-
 
50
	
-
 
51
	
-
 
52
 
-
 
53
	public boolean isCashBack() {
-
 
54
		return cashBack;
-
 
55
	}
-
 
56
 
-
 
57
	public void setCashBack(boolean cashBack) {
-
 
58
		this.cashBack = cashBack;
-
 
59
	}
48
 
60
 
49
	@Override
61
	@Override
50
	public boolean equals(Object obj) {
62
	public boolean equals(Object obj) {
51
		if (this == obj)
63
		if (this == obj)
52
			return true;
64
			return true;
Line 57... Line 69...
57
		CreateSchemeRequest other = (CreateSchemeRequest) obj;
69
		CreateSchemeRequest other = (CreateSchemeRequest) obj;
58
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
70
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
59
			return false;
71
			return false;
60
		if (amountType != other.amountType)
72
		if (amountType != other.amountType)
61
			return false;
73
			return false;
-
 
74
		if (cashBack != other.cashBack)
-
 
75
			return false;
62
		if (description == null) {
76
		if (description == null) {
63
			if (other.description != null)
77
			if (other.description != null)
64
				return false;
78
				return false;
65
		} else if (!description.equals(other.description))
79
		} else if (!description.equals(other.description))
66
			return false;
80
			return false;
Line 125... Line 139...
125
	}
139
	}
126
 
140
 
127
	@Override
141
	@Override
128
	public String toString() {
142
	public String toString() {
129
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
143
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
130
				+ amountType + ", partnerType=" + partnerType + ", amount=" + amount + ", startDate=" + startDate
144
				+ amountType + ", partnerType=" + partnerType + ", cashBack=" + cashBack + ", amount=" + amount
131
				+ ", endDate=" + endDate + ", itemIds=" + itemIds + "]";
145
				+ ", startDate=" + startDate + ", endDate=" + endDate + ", itemIds=" + itemIds + "]";
132
	}
146
	}
133
 
147
 
134
	public void setName(String name) {
148
	public void setName(String name) {
135
		this.name = name;
149
		this.name = name;
136
	}
150
	}