Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
22858 ashik.ali 1
package com.spice.profitmandi.common.model;
2
 
3
import java.util.Set;
4
 
5
public class CreateSchemeRequest {
6
 
7
	private String name;
8
	private String description;
9
	private String type;
10
	private String amountType;
11
	private float amount;
12
	private String startDateString;
13
	private String endDateString;
14
	private boolean active;
15
	private boolean retailerAll;
16
	private Set<Integer> retailerIds;
17
	private Set<Integer> itemIds;
18
 
19
	public String getName() {
20
		return name;
21
	}
22
	public void setName(String name) {
23
		this.name = name;
24
	}
25
	public String getDescription() {
26
		return description;
27
	}
28
	public void setDescription(String description) {
29
		this.description = description;
30
	}
31
	public String getType() {
32
		return type;
33
	}
34
	public void setType(String type) {
35
		this.type = type;
36
	}
37
	public String getAmountType() {
38
		return amountType;
39
	}
40
	public void setAmountType(String amountType) {
41
		this.amountType = amountType;
42
	}
43
	public float getAmount() {
44
		return amount;
45
	}
46
	public void setAmount(float amount) {
47
		this.amount = amount;
48
	}
49
	public String getStartDateString() {
50
		return startDateString;
51
	}
52
	public void setStartDateString(String startDateString) {
53
		this.startDateString = startDateString;
54
	}
55
	public String getEndDateString() {
56
		return endDateString;
57
	}
58
	public void setEndDateString(String endDateString) {
59
		this.endDateString = endDateString;
60
	}
61
	public boolean isActive() {
62
		return active;
63
	}
64
	public void setActive(boolean active) {
65
		this.active = active;
66
	}
67
	public boolean isRetailerAll() {
68
		return retailerAll;
69
	}
70
	public void setRetailerAll(boolean retailerAll) {
71
		this.retailerAll = retailerAll;
72
	}
73
	public Set<Integer> getRetailerIds() {
74
		return retailerIds;
75
	}
76
	public void setRetailerIds(Set<Integer> retailerIds) {
77
		this.retailerIds = retailerIds;
78
	}
79
 
80
	public Set<Integer> getItemIds() {
81
		return itemIds;
82
	}
83
 
84
	public void setItemIds(Set<Integer> itemIds) {
85
		this.itemIds = itemIds;
86
	}
87
 
88
	@Override
89
	public int hashCode() {
90
		final int prime = 31;
91
		int result = 1;
92
		result = prime * result + (active ? 1231 : 1237);
93
		result = prime * result + Float.floatToIntBits(amount);
94
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
95
		result = prime * result + ((description == null) ? 0 : description.hashCode());
96
		result = prime * result + ((endDateString == null) ? 0 : endDateString.hashCode());
97
		result = prime * result + ((itemIds == null) ? 0 : itemIds.hashCode());
98
		result = prime * result + ((name == null) ? 0 : name.hashCode());
99
		result = prime * result + (retailerAll ? 1231 : 1237);
100
		result = prime * result + ((retailerIds == null) ? 0 : retailerIds.hashCode());
101
		result = prime * result + ((startDateString == null) ? 0 : startDateString.hashCode());
102
		result = prime * result + ((type == null) ? 0 : type.hashCode());
103
		return result;
104
	}
105
 
106
	@Override
107
	public boolean equals(Object obj) {
108
		if (this == obj)
109
			return true;
110
		if (obj == null)
111
			return false;
112
		if (getClass() != obj.getClass())
113
			return false;
114
		CreateSchemeRequest other = (CreateSchemeRequest) obj;
115
		if (active != other.active)
116
			return false;
117
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
118
			return false;
119
		if (amountType != other.amountType)
120
			return false;
121
		if (description == null) {
122
			if (other.description != null)
123
				return false;
124
		} else if (!description.equals(other.description))
125
			return false;
126
		if (endDateString == null) {
127
			if (other.endDateString != null)
128
				return false;
129
		} else if (!endDateString.equals(other.endDateString))
130
			return false;
131
		if (itemIds == null) {
132
			if (other.itemIds != null)
133
				return false;
134
		} else if (!itemIds.equals(other.itemIds))
135
			return false;
136
		if (name == null) {
137
			if (other.name != null)
138
				return false;
139
		} else if (!name.equals(other.name))
140
			return false;
141
		if (retailerAll != other.retailerAll)
142
			return false;
143
		if (retailerIds == null) {
144
			if (other.retailerIds != null)
145
				return false;
146
		} else if (!retailerIds.equals(other.retailerIds))
147
			return false;
148
		if (startDateString == null) {
149
			if (other.startDateString != null)
150
				return false;
151
		} else if (!startDateString.equals(other.startDateString))
152
			return false;
153
		if (type != other.type)
154
			return false;
155
		return true;
156
	}
157
 
158
	@Override
159
	public String toString() {
160
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
161
				+ amountType + ", amount=" + amount + ", startDateString=" + startDateString + ", endDateString="
162
				+ endDateString + ", active=" + active + ", retailerAll=" + retailerAll + ", retailerIds=" + retailerIds
163
				+ ", itemIds=" + itemIds + "]";
164
	}
165
}