Subversion Repositories SmartDukaan

Rev

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