Subversion Repositories SmartDukaan

Rev

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

Rev 22858 Rev 23017
Line 7... Line 7...
7
	private String name;
7
	private String name;
8
	private String description;
8
	private String description;
9
	private String type;
9
	private String type;
10
	private String amountType;
10
	private String amountType;
11
	private float amount;
11
	private float amount;
12
	private String startDateString;
12
	private String startDateTimeString;
13
	private String endDateString;
13
	private String endDateTimeString;
14
	private boolean active;
-
 
15
	private boolean retailerAll;
14
	private boolean retailerAll;
16
	private Set<Integer> retailerIds;
15
	private Set<Integer> retailerIds;
17
	private Set<Integer> itemIds;
16
	private Set<Integer> itemIds;
18
	
17
	
19
	public String getName() {
18
	public String getName() {
Line 44... Line 43...
44
		return amount;
43
		return amount;
45
	}
44
	}
46
	public void setAmount(float amount) {
45
	public void setAmount(float amount) {
47
		this.amount = amount;
46
		this.amount = amount;
48
	}
47
	}
49
	public String getStartDateString() {
48
	public String getStartDateTimeString() {
50
		return startDateString;
49
		return startDateTimeString;
51
	}
50
	}
52
	public void setStartDateString(String startDateString) {
51
	public void setStartDateTimeString(String startDateTimeString) {
53
		this.startDateString = startDateString;
52
		this.startDateTimeString = startDateTimeString;
54
	}
53
	}
55
	public String getEndDateString() {
54
	public String getEndDateTimeString() {
56
		return endDateString;
55
		return endDateTimeString;
57
	}
56
	}
58
	public void setEndDateString(String endDateString) {
57
	public void setEndDateTimeString(String endDateTimeString) {
59
		this.endDateString = endDateString;
58
		this.endDateTimeString = endDateTimeString;
60
	}
-
 
61
	public boolean isActive() {
-
 
62
		return active;
-
 
63
	}
-
 
64
	public void setActive(boolean active) {
-
 
65
		this.active = active;
-
 
66
	}
59
	}
-
 
60
	
67
	public boolean isRetailerAll() {
61
	public boolean isRetailerAll() {
68
		return retailerAll;
62
		return retailerAll;
69
	}
63
	}
70
	public void setRetailerAll(boolean retailerAll) {
64
	public void setRetailerAll(boolean retailerAll) {
71
		this.retailerAll = retailerAll;
65
		this.retailerAll = retailerAll;
Line 84... Line 78...
84
	public void setItemIds(Set<Integer> itemIds) {
78
	public void setItemIds(Set<Integer> itemIds) {
85
		this.itemIds = itemIds;
79
		this.itemIds = itemIds;
86
	}
80
	}
87
	
81
	
88
	@Override
82
	@Override
89
	public int hashCode() {
-
 
90
		final int prime = 31;
-
 
91
		int result = 1;
-
 
92
		result = prime * result + (active ? 1231 : 1237);
-
 
93
		result = prime * result + Float.floatToIntBits(amount);
-
 
94
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
-
 
95
		result = prime * result + ((description == null) ? 0 : description.hashCode());
-
 
96
		result = prime * result + ((endDateString == null) ? 0 : endDateString.hashCode());
-
 
97
		result = prime * result + ((itemIds == null) ? 0 : itemIds.hashCode());
-
 
98
		result = prime * result + ((name == null) ? 0 : name.hashCode());
-
 
99
		result = prime * result + (retailerAll ? 1231 : 1237);
-
 
100
		result = prime * result + ((retailerIds == null) ? 0 : retailerIds.hashCode());
-
 
101
		result = prime * result + ((startDateString == null) ? 0 : startDateString.hashCode());
-
 
102
		result = prime * result + ((type == null) ? 0 : type.hashCode());
-
 
103
		return result;
-
 
104
	}
-
 
105
	
-
 
106
	@Override
-
 
107
	public boolean equals(Object obj) {
-
 
108
		if (this == obj)
-
 
109
			return true;
-
 
110
		if (obj == null)
-
 
111
			return false;
-
 
112
		if (getClass() != obj.getClass())
-
 
113
			return false;
-
 
114
		CreateSchemeRequest other = (CreateSchemeRequest) obj;
-
 
115
		if (active != other.active)
-
 
116
			return false;
-
 
117
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
-
 
118
			return false;
-
 
119
		if (amountType != other.amountType)
-
 
120
			return false;
-
 
121
		if (description == null) {
-
 
122
			if (other.description != null)
-
 
123
				return false;
-
 
124
		} else if (!description.equals(other.description))
-
 
125
			return false;
-
 
126
		if (endDateString == null) {
-
 
127
			if (other.endDateString != null)
-
 
128
				return false;
-
 
129
		} else if (!endDateString.equals(other.endDateString))
-
 
130
			return false;
-
 
131
		if (itemIds == null) {
-
 
132
			if (other.itemIds != null)
-
 
133
				return false;
-
 
134
		} else if (!itemIds.equals(other.itemIds))
-
 
135
			return false;
-
 
136
		if (name == null) {
-
 
137
			if (other.name != null)
-
 
138
				return false;
-
 
139
		} else if (!name.equals(other.name))
-
 
140
			return false;
-
 
141
		if (retailerAll != other.retailerAll)
-
 
142
			return false;
-
 
143
		if (retailerIds == null) {
-
 
144
			if (other.retailerIds != null)
-
 
145
				return false;
-
 
146
		} else if (!retailerIds.equals(other.retailerIds))
-
 
147
			return false;
-
 
148
		if (startDateString == null) {
-
 
149
			if (other.startDateString != null)
-
 
150
				return false;
-
 
151
		} else if (!startDateString.equals(other.startDateString))
-
 
152
			return false;
-
 
153
		if (type != other.type)
-
 
154
			return false;
-
 
155
		return true;
-
 
156
	}
-
 
157
	
-
 
158
	@Override
-
 
159
	public String toString() {
83
	public String toString() {
160
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
84
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
161
				+ amountType + ", amount=" + amount + ", startDateString=" + startDateString + ", endDateString="
85
				+ amountType + ", amount=" + amount + ", startDateTimeString=" + startDateTimeString + ", endDateTimeString="
162
				+ endDateString + ", active=" + active + ", retailerAll=" + retailerAll + ", retailerIds=" + retailerIds
86
				+ endDateTimeString + ", retailerAll=" + retailerAll + ", retailerIds=" + retailerIds
163
				+ ", itemIds=" + itemIds + "]";
87
				+ ", itemIds=" + itemIds + "]";
164
	}
88
	}
165
}
89
}