Subversion Repositories SmartDukaan

Rev

Rev 24143 | Rev 26821 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
22858 ashik.ali 1
package com.spice.profitmandi.common.model;
21612 ashik.ali 2
 
21680 ashik.ali 3
import java.util.Set;
4
 
21612 ashik.ali 5
public class CreateOrderRequest {
21680 ashik.ali 6
	private CustomCustomer customer;
22858 ashik.ali 7
	private Set<CustomFofoOrderItem> fofoOrderItems;
21680 ashik.ali 8
	private Set<CustomPaymentOption> paymentOptions;
22244 ashik.ali 9
	public void setCustomer(CustomCustomer customer) {
10
		this.customer = customer;
11
	}
21680 ashik.ali 12
	public CustomCustomer getCustomer() {
13
		return customer;
21612 ashik.ali 14
	}
24440 amit.gupta 15
	@Override
16
	public int hashCode() {
17
		final int prime = 31;
18
		int result = 1;
19
		result = prime * result + ((customer == null) ? 0 : customer.hashCode());
20
		result = prime * result + ((fofoOrderItems == null) ? 0 : fofoOrderItems.hashCode());
21
		result = prime * result + ((paymentOptions == null) ? 0 : paymentOptions.hashCode());
22
		return result;
22244 ashik.ali 23
	}
24440 amit.gupta 24
	@Override
25
	public boolean equals(Object obj) {
26
		if (this == obj)
27
			return true;
28
		if (obj == null)
29
			return false;
30
		if (getClass() != obj.getClass())
31
			return false;
32
		CreateOrderRequest other = (CreateOrderRequest) obj;
33
		if (customer == null) {
34
			if (other.customer != null)
35
				return false;
36
		} else if (!customer.equals(other.customer))
37
			return false;
38
		if (fofoOrderItems == null) {
39
			if (other.fofoOrderItems != null)
40
				return false;
41
		} else if (!fofoOrderItems.equals(other.fofoOrderItems))
42
			return false;
43
		if (paymentOptions == null) {
44
			if (other.paymentOptions != null)
45
				return false;
46
		} else if (!paymentOptions.equals(other.paymentOptions))
47
			return false;
48
		return true;
22244 ashik.ali 49
	}
22858 ashik.ali 50
	public Set<CustomFofoOrderItem> getFofoOrderItems() {
51
		return fofoOrderItems;
21612 ashik.ali 52
	}
22858 ashik.ali 53
	public void setFofoOrderItems(Set<CustomFofoOrderItem> fofoLineItems) {
54
		this.fofoOrderItems = fofoLineItems;
21680 ashik.ali 55
	}
56
	public Set<CustomPaymentOption> getPaymentOptions() {
57
		return paymentOptions;
58
	}
59
	public void setPaymentOptions(Set<CustomPaymentOption> paymentOptions) {
60
		this.paymentOptions = paymentOptions;
61
	}
23417 ashik.ali 62
 
21680 ashik.ali 63
	@Override
64
	public String toString() {
24440 amit.gupta 65
		return "CreateOrderRequest [customer=" + customer + ", fofoOrderItems=" + fofoOrderItems + ", paymentOptions="
66
				+ paymentOptions + "]";
21680 ashik.ali 67
	}
21612 ashik.ali 68
 
69
}