Subversion Repositories SmartDukaan

Rev

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

Rev 26821 Rev 28339
Line 3... Line 3...
3
import java.util.Set;
3
import java.util.Set;
4
 
4
 
5
public class CreateOrderRequest {
5
public class CreateOrderRequest {
6
	private CustomCustomer customer;
6
	private CustomCustomer customer;
7
	private int orderId;
7
	private int orderId;
-
 
8
	private Integer poId;
-
 
9
	private Integer poItemId;
8
	private Set<CustomFofoOrderItem> fofoOrderItems;
10
	private Set<CustomFofoOrderItem> fofoOrderItems;
9
	private Set<CustomPaymentOption> paymentOptions;
11
	private Set<CustomPaymentOption> paymentOptions;
10
	
-
 
11
	
12
 
12
	public void setCustomer(CustomCustomer customer) {
13
	public void setCustomer(CustomCustomer customer) {
13
		this.customer = customer;
14
		this.customer = customer;
14
	}
15
	}
-
 
16
 
15
	public CustomCustomer getCustomer() {
17
	public CustomCustomer getCustomer() {
16
		return customer;
18
		return customer;
17
	}
19
	}
-
 
20
 
18
	public int getOrderId() {
21
	public int getOrderId() {
19
		return orderId;
22
		return orderId;
20
	}
23
	}
-
 
24
 
21
	public void setOrderId(int orderId) {
25
	public void setOrderId(int orderId) {
22
		this.orderId = orderId;
26
		this.orderId = orderId;
23
	}
27
	}
-
 
28
 
24
	@Override
29
	@Override
25
	public int hashCode() {
30
	public int hashCode() {
26
		final int prime = 31;
31
		final int prime = 31;
27
		int result = 1;
32
		int result = 1;
28
		result = prime * result + ((customer == null) ? 0 : customer.hashCode());
33
		result = prime * result + ((customer == null) ? 0 : customer.hashCode());
29
		result = prime * result + ((fofoOrderItems == null) ? 0 : fofoOrderItems.hashCode());
34
		result = prime * result + ((fofoOrderItems == null) ? 0 : fofoOrderItems.hashCode());
30
		result = prime * result + orderId;
35
		result = prime * result + orderId;
31
		result = prime * result + ((paymentOptions == null) ? 0 : paymentOptions.hashCode());
36
		result = prime * result + ((paymentOptions == null) ? 0 : paymentOptions.hashCode());
-
 
37
		result = prime * result + poId;
-
 
38
		result = prime * result + poItemId;
32
		return result;
39
		return result;
33
	}
40
	}
-
 
41
 
34
	@Override
42
	@Override
35
	public boolean equals(Object obj) {
43
	public boolean equals(Object obj) {
36
		if (this == obj)
44
		if (this == obj)
37
			return true;
45
			return true;
38
		if (obj == null)
46
		if (obj == null)
Line 55... Line 63...
55
		if (paymentOptions == null) {
63
		if (paymentOptions == null) {
56
			if (other.paymentOptions != null)
64
			if (other.paymentOptions != null)
57
				return false;
65
				return false;
58
		} else if (!paymentOptions.equals(other.paymentOptions))
66
		} else if (!paymentOptions.equals(other.paymentOptions))
59
			return false;
67
			return false;
-
 
68
		if (poId != other.poId)
-
 
69
			return false;
-
 
70
		if (poItemId != other.poItemId)
-
 
71
			return false;
60
		return true;
72
		return true;
61
	}
73
	}
-
 
74
 
-
 
75
	public Integer getPoId() {
-
 
76
		return poId;
-
 
77
	}
-
 
78
 
-
 
79
	public void setPoId(Integer poId) {
-
 
80
		this.poId = poId;
-
 
81
	}
-
 
82
 
-
 
83
	public Integer getPoItemId() {
-
 
84
		return poItemId;
-
 
85
	}
-
 
86
 
-
 
87
	public void setPoItemId(Integer poItemId) {
-
 
88
		this.poItemId = poItemId;
-
 
89
	}
-
 
90
 
62
	public Set<CustomFofoOrderItem> getFofoOrderItems() {
91
	public Set<CustomFofoOrderItem> getFofoOrderItems() {
63
		return fofoOrderItems;
92
		return fofoOrderItems;
64
	}
93
	}
-
 
94
 
65
	public void setFofoOrderItems(Set<CustomFofoOrderItem> fofoLineItems) {
95
	public void setFofoOrderItems(Set<CustomFofoOrderItem> fofoLineItems) {
66
		this.fofoOrderItems = fofoLineItems;
96
		this.fofoOrderItems = fofoLineItems;
67
	}
97
	}
-
 
98
 
68
	public Set<CustomPaymentOption> getPaymentOptions() {
99
	public Set<CustomPaymentOption> getPaymentOptions() {
69
		return paymentOptions;
100
		return paymentOptions;
70
	}
101
	}
-
 
102
 
71
	public void setPaymentOptions(Set<CustomPaymentOption> paymentOptions) {
103
	public void setPaymentOptions(Set<CustomPaymentOption> paymentOptions) {
72
		this.paymentOptions = paymentOptions;
104
		this.paymentOptions = paymentOptions;
73
	}
105
	}
74
	
106
 
75
	@Override
107
	@Override
76
	public String toString() {
108
	public String toString() {
77
		return "CreateOrderRequest [customer=" + customer + ", orderId=" + orderId + ", fofoOrderItems="
109
		return "CreateOrderRequest [customer=" + customer + ", orderId=" + orderId + ", poId=" + poId + ", poItemId="
78
				+ fofoOrderItems + ", paymentOptions=" + paymentOptions + "]";
110
				+ poItemId + ", fofoOrderItems=" + fofoOrderItems + ", paymentOptions=" + paymentOptions + "]";
79
	}
111
	}
80
	
112
 
81
}
113
}