Subversion Repositories SmartDukaan

Rev

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

Rev 24440 Rev 26821
Line 2... Line 2...
2
 
2
 
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 Set<CustomFofoOrderItem> fofoOrderItems;
8
	private Set<CustomFofoOrderItem> fofoOrderItems;
8
	private Set<CustomPaymentOption> paymentOptions;
9
	private Set<CustomPaymentOption> paymentOptions;
-
 
10
	
-
 
11
	
9
	public void setCustomer(CustomCustomer customer) {
12
	public void setCustomer(CustomCustomer customer) {
10
		this.customer = customer;
13
		this.customer = customer;
11
	}
14
	}
12
	public CustomCustomer getCustomer() {
15
	public CustomCustomer getCustomer() {
13
		return customer;
16
		return customer;
14
	}
17
	}
-
 
18
	public int getOrderId() {
-
 
19
		return orderId;
-
 
20
	}
-
 
21
	public void setOrderId(int orderId) {
-
 
22
		this.orderId = orderId;
-
 
23
	}
15
	@Override
24
	@Override
16
	public int hashCode() {
25
	public int hashCode() {
17
		final int prime = 31;
26
		final int prime = 31;
18
		int result = 1;
27
		int result = 1;
19
		result = prime * result + ((customer == null) ? 0 : customer.hashCode());
28
		result = prime * result + ((customer == null) ? 0 : customer.hashCode());
20
		result = prime * result + ((fofoOrderItems == null) ? 0 : fofoOrderItems.hashCode());
29
		result = prime * result + ((fofoOrderItems == null) ? 0 : fofoOrderItems.hashCode());
-
 
30
		result = prime * result + orderId;
21
		result = prime * result + ((paymentOptions == null) ? 0 : paymentOptions.hashCode());
31
		result = prime * result + ((paymentOptions == null) ? 0 : paymentOptions.hashCode());
22
		return result;
32
		return result;
23
	}
33
	}
24
	@Override
34
	@Override
25
	public boolean equals(Object obj) {
35
	public boolean equals(Object obj) {
Line 38... Line 48...
38
		if (fofoOrderItems == null) {
48
		if (fofoOrderItems == null) {
39
			if (other.fofoOrderItems != null)
49
			if (other.fofoOrderItems != null)
40
				return false;
50
				return false;
41
		} else if (!fofoOrderItems.equals(other.fofoOrderItems))
51
		} else if (!fofoOrderItems.equals(other.fofoOrderItems))
42
			return false;
52
			return false;
-
 
53
		if (orderId != other.orderId)
-
 
54
			return false;
43
		if (paymentOptions == null) {
55
		if (paymentOptions == null) {
44
			if (other.paymentOptions != null)
56
			if (other.paymentOptions != null)
45
				return false;
57
				return false;
46
		} else if (!paymentOptions.equals(other.paymentOptions))
58
		} else if (!paymentOptions.equals(other.paymentOptions))
47
			return false;
59
			return false;
Line 60... Line 72...
60
		this.paymentOptions = paymentOptions;
72
		this.paymentOptions = paymentOptions;
61
	}
73
	}
62
	
74
	
63
	@Override
75
	@Override
64
	public String toString() {
76
	public String toString() {
65
		return "CreateOrderRequest [customer=" + customer + ", fofoOrderItems=" + fofoOrderItems + ", paymentOptions="
77
		return "CreateOrderRequest [customer=" + customer + ", orderId=" + orderId + ", fofoOrderItems="
66
				+ paymentOptions + "]";
78
				+ fofoOrderItems + ", paymentOptions=" + paymentOptions + "]";
67
	}
79
	}
68
	
80
	
69
}
81
}