Subversion Repositories SmartDukaan

Rev

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

Rev 21819 Rev 21924
Line 176... Line 176...
176
	}
176
	}
177
	public void setPaymentOption(int paymentOption) {
177
	public void setPaymentOption(int paymentOption) {
178
		this.paymentOption = paymentOption;
178
		this.paymentOption = paymentOption;
179
	}
179
	}
180
	
180
	
-
 
181
	
-
 
182
	
-
 
183
	@Override
-
 
184
	public int hashCode() {
-
 
185
		final int prime = 31;
-
 
186
		int result = 1;
-
 
187
		result = prime * result + ((couponCode == null) ? 0 : couponCode.hashCode());
-
 
188
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
189
		result = prime * result + ((firstSource == null) ? 0 : firstSource.hashCode());
-
 
190
		result = prime * result + ((firstSourceStateTime == null) ? 0 : firstSourceStateTime.hashCode());
-
 
191
		result = prime * result + id;
-
 
192
		result = prime * result + paymentOption;
-
 
193
		result = prime * result + retailerId;
-
 
194
		result = prime * result + ((sessionSource == null) ? 0 : sessionSource.hashCode());
-
 
195
		result = prime * result + ((sessionStateTime == null) ? 0 : sessionStateTime.hashCode());
-
 
196
		result = prime * result + shoppingCartId;
-
 
197
		result = prime * result + ((status == null) ? 0 : status.hashCode());
-
 
198
		result = prime * result + ((statusMessage == null) ? 0 : statusMessage.hashCode());
-
 
199
		result = prime * result + Float.floatToIntBits(totalCodCharges);
-
 
200
		result = prime * result + Float.floatToIntBits(totalShippingCost);
-
 
201
		return result;
-
 
202
	}
-
 
203
	@Override
-
 
204
	public boolean equals(Object obj) {
-
 
205
		if (this == obj)
-
 
206
			return true;
-
 
207
		if (obj == null)
-
 
208
			return false;
-
 
209
		if (getClass() != obj.getClass())
-
 
210
			return false;
-
 
211
		Transaction other = (Transaction) obj;
-
 
212
		if (couponCode == null) {
-
 
213
			if (other.couponCode != null)
-
 
214
				return false;
-
 
215
		} else if (!couponCode.equals(other.couponCode))
-
 
216
			return false;
-
 
217
		if (createTimestamp == null) {
-
 
218
			if (other.createTimestamp != null)
-
 
219
				return false;
-
 
220
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
221
			return false;
-
 
222
		if (firstSource == null) {
-
 
223
			if (other.firstSource != null)
-
 
224
				return false;
-
 
225
		} else if (!firstSource.equals(other.firstSource))
-
 
226
			return false;
-
 
227
		if (firstSourceStateTime == null) {
-
 
228
			if (other.firstSourceStateTime != null)
-
 
229
				return false;
-
 
230
		} else if (!firstSourceStateTime.equals(other.firstSourceStateTime))
-
 
231
			return false;
-
 
232
		if (id != other.id)
-
 
233
			return false;
-
 
234
		if (paymentOption != other.paymentOption)
-
 
235
			return false;
-
 
236
		if (retailerId != other.retailerId)
-
 
237
			return false;
-
 
238
		if (sessionSource == null) {
-
 
239
			if (other.sessionSource != null)
-
 
240
				return false;
-
 
241
		} else if (!sessionSource.equals(other.sessionSource))
-
 
242
			return false;
-
 
243
		if (sessionStateTime == null) {
-
 
244
			if (other.sessionStateTime != null)
-
 
245
				return false;
-
 
246
		} else if (!sessionStateTime.equals(other.sessionStateTime))
-
 
247
			return false;
-
 
248
		if (shoppingCartId != other.shoppingCartId)
-
 
249
			return false;
-
 
250
		if (status != other.status)
-
 
251
			return false;
-
 
252
		if (statusMessage == null) {
-
 
253
			if (other.statusMessage != null)
-
 
254
				return false;
-
 
255
		} else if (!statusMessage.equals(other.statusMessage))
-
 
256
			return false;
-
 
257
		if (Float.floatToIntBits(totalCodCharges) != Float.floatToIntBits(other.totalCodCharges))
-
 
258
			return false;
-
 
259
		if (Float.floatToIntBits(totalShippingCost) != Float.floatToIntBits(other.totalShippingCost))
-
 
260
			return false;
-
 
261
		return true;
-
 
262
	}
181
	@Override
263
	@Override
182
	public String toString() {
264
	public String toString() {
183
		return "Transaction [createTimestamp=" + createTimestamp + ", status=" + status + ", statusMessage="
265
		return "Transaction [createTimestamp=" + createTimestamp + ", status=" + status + ", statusMessage="
184
				+ statusMessage + ", retailerId=" + retailerId + ", shoppingCartId=" + shoppingCartId + ", couponCode="
266
				+ statusMessage + ", retailerId=" + retailerId + ", shoppingCartId=" + shoppingCartId + ", couponCode="
185
				+ couponCode + ", sessionSource=" + sessionSource + ", sessionStateTime=" + sessionStateTime
267
				+ couponCode + ", sessionSource=" + sessionSource + ", sessionStateTime=" + sessionStateTime