Subversion Repositories SmartDukaan

Rev

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

Rev 26679 Rev 28465
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
	private boolean cashback;
34
	@Override
34
	@Override
35
	public int hashCode() {
35
	public int hashCode() {
36
		final int prime = 31;
36
		final int prime = 31;
37
		int result = 1;
37
		int result = 1;
38
		result = prime * result + Float.floatToIntBits(amount);
38
		result = prime * result + Float.floatToIntBits(amount);
39
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
39
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
40
		result = prime * result + (cashBack ? 1231 : 1237);
40
		result = prime * result + (cashback ? 1231 : 1237);
41
		result = prime * result + ((description == null) ? 0 : description.hashCode());
41
		result = prime * result + ((description == null) ? 0 : description.hashCode());
42
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
42
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
43
		result = prime * result + ((itemIds == null) ? 0 : itemIds.hashCode());
43
		result = prime * result + ((itemIds == null) ? 0 : itemIds.hashCode());
44
		result = prime * result + ((name == null) ? 0 : name.hashCode());
44
		result = prime * result + ((name == null) ? 0 : name.hashCode());
45
		result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());
45
		result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());
Line 48... Line 48...
48
		return result;
48
		return result;
49
	}
49
	}
50
	
50
	
51
	
51
	
52
 
52
 
53
	public boolean isCashBack() {
53
	public boolean isCashback() {
54
		return cashBack;
54
		return cashback;
55
	}
55
	}
56
 
56
 
57
	public void setCashBack(boolean cashBack) {
57
	public void setCashback(boolean cashback) {
58
		this.cashBack = cashBack;
58
		this.cashback = cashback;
59
	}
59
	}
60
 
60
 
61
	@Override
61
	@Override
62
	public boolean equals(Object obj) {
62
	public boolean equals(Object obj) {
63
		if (this == obj)
63
		if (this == obj)
Line 69... Line 69...
69
		CreateSchemeRequest other = (CreateSchemeRequest) obj;
69
		CreateSchemeRequest other = (CreateSchemeRequest) obj;
70
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
70
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
71
			return false;
71
			return false;
72
		if (amountType != other.amountType)
72
		if (amountType != other.amountType)
73
			return false;
73
			return false;
74
		if (cashBack != other.cashBack)
74
		if (cashback != other.cashback)
75
			return false;
75
			return false;
76
		if (description == null) {
76
		if (description == null) {
77
			if (other.description != null)
77
			if (other.description != null)
78
				return false;
78
				return false;
79
		} else if (!description.equals(other.description))
79
		} else if (!description.equals(other.description))
Line 139... Line 139...
139
	}
139
	}
140
 
140
 
141
	@Override
141
	@Override
142
	public String toString() {
142
	public String toString() {
143
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
143
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
144
				+ amountType + ", partnerType=" + partnerType + ", cashBack=" + cashBack + ", amount=" + amount
144
				+ amountType + ", partnerType=" + partnerType + ", cashBack=" + cashback + ", amount=" + amount
145
				+ ", startDate=" + startDate + ", endDate=" + endDate + ", itemIds=" + itemIds + "]";
145
				+ ", startDate=" + startDate + ", endDate=" + endDate + ", itemIds=" + itemIds + "]";
146
	}
146
	}
147
 
147
 
148
	public void setName(String name) {
148
	public void setName(String name) {
149
		this.name = name;
149
		this.name = name;