Subversion Repositories SmartDukaan

Rev

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

Rev 24143 Rev 24440
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
3
import java.time.LocalDate;
-
 
4
import java.util.Set;
3
import java.util.Set;
5
 
4
 
6
public class CreateOrderRequest {
5
public class CreateOrderRequest {
7
	private CustomCustomer customer;
6
	private CustomCustomer customer;
8
	private LocalDate customerDateOfBirth;
-
 
9
	private Set<CustomFofoOrderItem> fofoOrderItems;
7
	private Set<CustomFofoOrderItem> fofoOrderItems;
10
	private Set<CustomPaymentOption> paymentOptions;
8
	private Set<CustomPaymentOption> paymentOptions;
11
	public void setCustomer(CustomCustomer customer) {
9
	public void setCustomer(CustomCustomer customer) {
12
		this.customer = customer;
10
		this.customer = customer;
13
	}
11
	}
14
	public CustomCustomer getCustomer() {
12
	public CustomCustomer getCustomer() {
15
		return customer;
13
		return customer;
16
	}
14
	}
-
 
15
	@Override
-
 
16
	public int hashCode() {
-
 
17
		final int prime = 31;
-
 
18
		int result = 1;
17
	public void setCustomerDateOfBirth(LocalDate customerDateOfBirth) {
19
		result = prime * result + ((customer == null) ? 0 : customer.hashCode());
-
 
20
		result = prime * result + ((fofoOrderItems == null) ? 0 : fofoOrderItems.hashCode());
18
		this.customerDateOfBirth = customerDateOfBirth;
21
		result = prime * result + ((paymentOptions == null) ? 0 : paymentOptions.hashCode());
-
 
22
		return result;
19
	}
23
	}
-
 
24
	@Override
20
	public LocalDate getCustomerDateOfBirth() {
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;
21
		return customerDateOfBirth;
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;
22
	}
49
	}
23
	
-
 
24
	public Set<CustomFofoOrderItem> getFofoOrderItems() {
50
	public Set<CustomFofoOrderItem> getFofoOrderItems() {
25
		return fofoOrderItems;
51
		return fofoOrderItems;
26
	}
52
	}
27
	public void setFofoOrderItems(Set<CustomFofoOrderItem> fofoLineItems) {
53
	public void setFofoOrderItems(Set<CustomFofoOrderItem> fofoLineItems) {
28
		this.fofoOrderItems = fofoLineItems;
54
		this.fofoOrderItems = fofoLineItems;
Line 34... Line 60...
34
		this.paymentOptions = paymentOptions;
60
		this.paymentOptions = paymentOptions;
35
	}
61
	}
36
	
62
	
37
	@Override
63
	@Override
38
	public String toString() {
64
	public String toString() {
39
		return "CreateOrderRequest [customer=" + customer + ", customerDateOfBirth=" + customerDateOfBirth
65
		return "CreateOrderRequest [customer=" + customer + ", fofoOrderItems=" + fofoOrderItems + ", paymentOptions="
40
				+ ", fofoOrderItems=" + fofoOrderItems + ", paymentOptions=" + paymentOptions + "]";
66
				+ paymentOptions + "]";
41
	}
67
	}
42
	
68
	
43
}
69
}