Subversion Repositories SmartDukaan

Rev

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

Rev 29645 Rev 29707
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;
3
import java.time.LocalDateTime;
4
import java.time.LocalDateTime;
-
 
5
import java.util.Set;
4
 
6
 
5
public class InsuranceModel {
7
public class InsuranceModel {
6
	private String brand;
8
	private String brand;
7
	private String color;
9
	private String color;
8
	private String ram;
10
	private String ram;
9
	private String memory;
11
	private String memory;
10
	private LocalDateTime mfgDate;
12
	private LocalDateTime mfgDate;
-
 
13
	private LocalDate wmfgDate;
11
	private String modelName;
14
	private String modelName;
12
	private float insuranceAmount;
15
	private float insuranceAmount;
13
	private String insuranceId;
16
	private String insuranceId;
14
	private float deviceSellingPrice;
17
	private float deviceSellingPrice;
15
	private String serialNumber;
18
	private String serialNumber;
16
	private String providerName;
19
	private String providerName;
17
	private String providerId;
20
	private String providerId;
18
	private String underWriterName;
21
	private String underWriterName;
19
	private String underWriterId;
22
	private String underWriterId;
-
 
23
	private int customerId;
-
 
24
	private String customerEmail;
-
 
25
	private LocalDate dob;
-
 
26
	private int fofoOrderId;
-
 
27
	private int fofoOrderItemId;
-
 
28
	private Set<CustomPaymentOption> paymentOptions;
-
 
29
 
-
 
30
	public Set<CustomPaymentOption> getPaymentOptions() {
-
 
31
		return paymentOptions;
-
 
32
	}
-
 
33
 
-
 
34
	public void setPaymentOptions(Set<CustomPaymentOption> paymentOptions) {
-
 
35
		this.paymentOptions = paymentOptions;
20
	
36
	}
-
 
37
 
-
 
38
	public int getFofoOrderId() {
-
 
39
		return fofoOrderId;
-
 
40
	}
-
 
41
 
-
 
42
	public void setFofoOrderId(int fofoOrderId) {
-
 
43
		this.fofoOrderId = fofoOrderId;
-
 
44
	}
-
 
45
 
-
 
46
	public int getFofoOrderItemId() {
-
 
47
		return fofoOrderItemId;
-
 
48
	}
-
 
49
 
-
 
50
	public void setFofoOrderItemId(int fofoOrderItemId) {
-
 
51
		this.fofoOrderItemId = fofoOrderItemId;
21
	
52
	}
-
 
53
 
22
	public String getRam() {
54
	public String getRam() {
23
		return ram;
55
		return ram;
24
	}
56
	}
-
 
57
 
25
	public void setRam(String ram) {
58
	public void setRam(String ram) {
26
		this.ram = ram;
59
		this.ram = ram;
27
	}
60
	}
-
 
61
 
28
	public String getMemory() {
62
	public String getMemory() {
29
		return memory;
63
		return memory;
30
	}
64
	}
-
 
65
 
31
	public void setMemory(String memory) {
66
	public void setMemory(String memory) {
32
		this.memory = memory;
67
		this.memory = memory;
33
	}
68
	}
-
 
69
 
34
	public LocalDateTime getMfgDate() {
70
	public LocalDateTime getMfgDate() {
35
		return mfgDate;
71
		return mfgDate;
36
	}
72
	}
-
 
73
 
37
	public void setMfgDate(LocalDateTime mfgDate) {
74
	public void setMfgDate(LocalDateTime mfgDate) {
38
		this.mfgDate = mfgDate;
75
		this.mfgDate = mfgDate;
39
	}
76
	}
-
 
77
 
40
	public String getColor() {
78
	public String getColor() {
41
		return color;
79
		return color;
42
	}
80
	}
-
 
81
 
43
	public void setColor(String color) {
82
	public void setColor(String color) {
44
		this.color = color;
83
		this.color = color;
45
	}
84
	}
-
 
85
 
46
	public String getSerialNumber() {
86
	public String getSerialNumber() {
47
		return serialNumber;
87
		return serialNumber;
48
	}
88
	}
-
 
89
 
49
	public void setSerialNumber(String serialNumber) {
90
	public void setSerialNumber(String serialNumber) {
50
		this.serialNumber = serialNumber;
91
		this.serialNumber = serialNumber;
51
	}
92
	}
-
 
93
 
52
	public float getDeviceSellingPrice() {
94
	public float getDeviceSellingPrice() {
53
		return deviceSellingPrice;
95
		return deviceSellingPrice;
54
	}
96
	}
-
 
97
 
55
	public void setDeviceSellingPrice(float deviceSellingPrice) {
98
	public void setDeviceSellingPrice(float deviceSellingPrice) {
56
		this.deviceSellingPrice = deviceSellingPrice;
99
		this.deviceSellingPrice = deviceSellingPrice;
57
	}
100
	}
58
	
-
 
59
	
101
 
60
	@Override
-
 
61
	public String toString() {
-
 
62
		return "InsuranceModel [brand=" + brand + ", color=" + color + ", ram=" + ram + ", memory=" + memory
-
 
63
				+ ", mfgDate=" + mfgDate + ", serialNumber=" + serialNumber + ", modelName=" + modelName
-
 
64
				+ ", insuranceAmount=" + insuranceAmount + ", insuranceId=" + insuranceId + ", deviceSellingPrice="
-
 
65
				+ deviceSellingPrice + ", providerName=" + providerName + ", providerId=" + providerId
-
 
66
				+ ", underWriterName=" + underWriterName + ", underWriterId=" + underWriterId + "]";
-
 
67
	}
-
 
68
	public String getBrand() {
102
	public String getBrand() {
69
		return brand;
103
		return brand;
70
	}
104
	}
-
 
105
 
71
	public void setBrand(String brand) {
106
	public void setBrand(String brand) {
72
		this.brand = brand;
107
		this.brand = brand;
73
	}
108
	}
-
 
109
 
74
	public String getModelName() {
110
	public String getModelName() {
75
		return modelName;
111
		return modelName;
76
	}
112
	}
-
 
113
 
77
	public void setModelName(String modelName) {
114
	public void setModelName(String modelName) {
78
		this.modelName = modelName;
115
		this.modelName = modelName;
79
	}
116
	}
-
 
117
 
80
	public float getInsuranceAmount() {
118
	public float getInsuranceAmount() {
81
		return insuranceAmount;
119
		return insuranceAmount;
82
	}
120
	}
-
 
121
 
83
	public void setInsuranceAmount(float insuranceAmount) {
122
	public void setInsuranceAmount(float insuranceAmount) {
84
		this.insuranceAmount = insuranceAmount;
123
		this.insuranceAmount = insuranceAmount;
85
	}
124
	}
-
 
125
 
86
	public String getInsuranceId() {
126
	public String getInsuranceId() {
87
		return insuranceId;
127
		return insuranceId;
88
	}
128
	}
-
 
129
 
89
	public void setInsuranceId(String insuranceId) {
130
	public void setInsuranceId(String insuranceId) {
90
		this.insuranceId = insuranceId;
131
		this.insuranceId = insuranceId;
91
	}
132
	}
-
 
133
 
92
	public String getProviderName() {
134
	public String getProviderName() {
93
		return providerName;
135
		return providerName;
94
	}
136
	}
-
 
137
 
95
	public void setProviderName(String providerName) {
138
	public void setProviderName(String providerName) {
96
		this.providerName = providerName;
139
		this.providerName = providerName;
97
	}
140
	}
-
 
141
 
98
	public String getProviderId() {
142
	public String getProviderId() {
99
		return providerId;
143
		return providerId;
100
	}
144
	}
-
 
145
 
101
	public void setProviderId(String providerId) {
146
	public void setProviderId(String providerId) {
102
		this.providerId = providerId;
147
		this.providerId = providerId;
103
	}
148
	}
-
 
149
 
104
	public String getUnderWriterName() {
150
	public String getUnderWriterName() {
105
		return underWriterName;
151
		return underWriterName;
106
	}
152
	}
-
 
153
 
107
	public void setUnderWriterName(String underWriterName) {
154
	public void setUnderWriterName(String underWriterName) {
108
		this.underWriterName = underWriterName;
155
		this.underWriterName = underWriterName;
109
	}
156
	}
-
 
157
 
110
	public String getUnderWriterId() {
158
	public String getUnderWriterId() {
111
		return underWriterId;
159
		return underWriterId;
112
	}
160
	}
-
 
161
 
113
	public void setUnderWriterId(String underWriterId) {
162
	public void setUnderWriterId(String underWriterId) {
114
		this.underWriterId = underWriterId;
163
		this.underWriterId = underWriterId;
115
	}
164
	}
-
 
165
 
-
 
166
	public int getCustomerId() {
-
 
167
		return customerId;
-
 
168
	}
-
 
169
 
-
 
170
	public void setCustomerId(int customerId) {
-
 
171
		this.customerId = customerId;
-
 
172
	}
-
 
173
 
-
 
174
	public String getCustomerEmail() {
-
 
175
		return customerEmail;
-
 
176
	}
-
 
177
 
-
 
178
	public void setCustomerEmail(String customerEmail) {
-
 
179
		this.customerEmail = customerEmail;
-
 
180
	}
-
 
181
 
-
 
182
	public LocalDate getWmfgDate() {
-
 
183
		return wmfgDate;
-
 
184
	}
-
 
185
 
-
 
186
	public void setWmfgDate(LocalDate wmfgDate) {
-
 
187
		this.wmfgDate = wmfgDate;
-
 
188
	}
-
 
189
 
-
 
190
	public LocalDate getDob() {
-
 
191
		return dob;
-
 
192
	}
-
 
193
 
-
 
194
	public void setDob(LocalDate dob) {
-
 
195
		this.dob = dob;
-
 
196
	}
-
 
197
 
116
	@Override
198
	@Override
117
	public int hashCode() {
199
	public int hashCode() {
118
		final int prime = 31;
200
		final int prime = 31;
119
		int result = 1;
201
		int result = 1;
120
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
202
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
-
 
203
		result = prime * result + ((color == null) ? 0 : color.hashCode());
-
 
204
		result = prime * result + ((customerEmail == null) ? 0 : customerEmail.hashCode());
-
 
205
		result = prime * result + customerId;
121
		result = prime * result + Float.floatToIntBits(deviceSellingPrice);
206
		result = prime * result + Float.floatToIntBits(deviceSellingPrice);
-
 
207
		result = prime * result + ((dob == null) ? 0 : dob.hashCode());
-
 
208
		result = prime * result + fofoOrderId;
-
 
209
		result = prime * result + fofoOrderItemId;
122
		result = prime * result + Float.floatToIntBits(insuranceAmount);
210
		result = prime * result + Float.floatToIntBits(insuranceAmount);
123
		result = prime * result + ((insuranceId == null) ? 0 : insuranceId.hashCode());
211
		result = prime * result + ((insuranceId == null) ? 0 : insuranceId.hashCode());
-
 
212
		result = prime * result + ((memory == null) ? 0 : memory.hashCode());
-
 
213
		result = prime * result + ((mfgDate == null) ? 0 : mfgDate.hashCode());
124
		result = prime * result + ((modelName == null) ? 0 : modelName.hashCode());
214
		result = prime * result + ((modelName == null) ? 0 : modelName.hashCode());
125
		result = prime * result + ((providerId == null) ? 0 : providerId.hashCode());
215
		result = prime * result + ((providerId == null) ? 0 : providerId.hashCode());
126
		result = prime * result + ((providerName == null) ? 0 : providerName.hashCode());
216
		result = prime * result + ((providerName == null) ? 0 : providerName.hashCode());
-
 
217
		result = prime * result + ((ram == null) ? 0 : ram.hashCode());
-
 
218
		result = prime * result + ((serialNumber == null) ? 0 : serialNumber.hashCode());
127
		result = prime * result + ((underWriterId == null) ? 0 : underWriterId.hashCode());
219
		result = prime * result + ((underWriterId == null) ? 0 : underWriterId.hashCode());
128
		result = prime * result + ((underWriterName == null) ? 0 : underWriterName.hashCode());
220
		result = prime * result + ((underWriterName == null) ? 0 : underWriterName.hashCode());
-
 
221
		result = prime * result + ((wmfgDate == null) ? 0 : wmfgDate.hashCode());
129
		return result;
222
		return result;
130
	}
223
	}
-
 
224
 
131
	@Override
225
	@Override
132
	public boolean equals(Object obj) {
226
	public boolean equals(Object obj) {
133
		if (this == obj)
227
		if (this == obj)
134
			return true;
228
			return true;
135
		if (obj == null)
229
		if (obj == null)
Line 140... Line 234...
140
		if (brand == null) {
234
		if (brand == null) {
141
			if (other.brand != null)
235
			if (other.brand != null)
142
				return false;
236
				return false;
143
		} else if (!brand.equals(other.brand))
237
		} else if (!brand.equals(other.brand))
144
			return false;
238
			return false;
-
 
239
		if (color == null) {
-
 
240
			if (other.color != null)
-
 
241
				return false;
-
 
242
		} else if (!color.equals(other.color))
-
 
243
			return false;
-
 
244
		if (customerEmail == null) {
-
 
245
			if (other.customerEmail != null)
-
 
246
				return false;
-
 
247
		} else if (!customerEmail.equals(other.customerEmail))
-
 
248
			return false;
-
 
249
		if (customerId != other.customerId)
-
 
250
			return false;
145
		if (Float.floatToIntBits(deviceSellingPrice) != Float.floatToIntBits(other.deviceSellingPrice))
251
		if (Float.floatToIntBits(deviceSellingPrice) != Float.floatToIntBits(other.deviceSellingPrice))
146
			return false;
252
			return false;
-
 
253
		if (dob == null) {
-
 
254
			if (other.dob != null)
-
 
255
				return false;
-
 
256
		} else if (!dob.equals(other.dob))
-
 
257
			return false;
-
 
258
		if (fofoOrderId != other.fofoOrderId)
-
 
259
			return false;
-
 
260
		if (fofoOrderItemId != other.fofoOrderItemId)
-
 
261
			return false;
147
		if (Float.floatToIntBits(insuranceAmount) != Float.floatToIntBits(other.insuranceAmount))
262
		if (Float.floatToIntBits(insuranceAmount) != Float.floatToIntBits(other.insuranceAmount))
148
			return false;
263
			return false;
149
		if (insuranceId == null) {
264
		if (insuranceId == null) {
150
			if (other.insuranceId != null)
265
			if (other.insuranceId != null)
151
				return false;
266
				return false;
152
		} else if (!insuranceId.equals(other.insuranceId))
267
		} else if (!insuranceId.equals(other.insuranceId))
153
			return false;
268
			return false;
-
 
269
		if (memory == null) {
-
 
270
			if (other.memory != null)
-
 
271
				return false;
-
 
272
		} else if (!memory.equals(other.memory))
-
 
273
			return false;
-
 
274
		if (mfgDate == null) {
-
 
275
			if (other.mfgDate != null)
-
 
276
				return false;
-
 
277
		} else if (!mfgDate.equals(other.mfgDate))
-
 
278
			return false;
154
		if (modelName == null) {
279
		if (modelName == null) {
155
			if (other.modelName != null)
280
			if (other.modelName != null)
156
				return false;
281
				return false;
157
		} else if (!modelName.equals(other.modelName))
282
		} else if (!modelName.equals(other.modelName))
158
			return false;
283
			return false;
Line 164... Line 289...
164
		if (providerName == null) {
289
		if (providerName == null) {
165
			if (other.providerName != null)
290
			if (other.providerName != null)
166
				return false;
291
				return false;
167
		} else if (!providerName.equals(other.providerName))
292
		} else if (!providerName.equals(other.providerName))
168
			return false;
293
			return false;
-
 
294
		if (ram == null) {
-
 
295
			if (other.ram != null)
-
 
296
				return false;
-
 
297
		} else if (!ram.equals(other.ram))
-
 
298
			return false;
-
 
299
		if (serialNumber == null) {
-
 
300
			if (other.serialNumber != null)
-
 
301
				return false;
-
 
302
		} else if (!serialNumber.equals(other.serialNumber))
-
 
303
			return false;
169
		if (underWriterId == null) {
304
		if (underWriterId == null) {
170
			if (other.underWriterId != null)
305
			if (other.underWriterId != null)
171
				return false;
306
				return false;
172
		} else if (!underWriterId.equals(other.underWriterId))
307
		} else if (!underWriterId.equals(other.underWriterId))
173
			return false;
308
			return false;
174
		if (underWriterName == null) {
309
		if (underWriterName == null) {
175
			if (other.underWriterName != null)
310
			if (other.underWriterName != null)
176
				return false;
311
				return false;
177
		} else if (!underWriterName.equals(other.underWriterName))
312
		} else if (!underWriterName.equals(other.underWriterName))
178
			return false;
313
			return false;
-
 
314
		if (wmfgDate == null) {
-
 
315
			if (other.wmfgDate != null)
-
 
316
				return false;
-
 
317
		} else if (!wmfgDate.equals(other.wmfgDate))
-
 
318
			return false;
179
		return true;
319
		return true;
180
	}
320
	}
181
	
321
 
182
	
322
	@Override
-
 
323
	public String toString() {
-
 
324
		return "InsuranceModel [brand=" + brand + ", color=" + color + ", ram=" + ram + ", memory=" + memory
-
 
325
				+ ", mfgDate=" + mfgDate + ", wmfgDate=" + wmfgDate + ", modelName=" + modelName + ", insuranceAmount="
-
 
326
				+ insuranceAmount + ", insuranceId=" + insuranceId + ", deviceSellingPrice=" + deviceSellingPrice
-
 
327
				+ ", serialNumber=" + serialNumber + ", providerName=" + providerName + ", providerId=" + providerId
-
 
328
				+ ", underWriterName=" + underWriterName + ", underWriterId=" + underWriterId + ", customerId="
-
 
329
				+ customerId + ", customerEmail=" + customerEmail + ", dob=" + dob + ", fofoOrderId=" + fofoOrderId
-
 
330
				+ ", fofoOrderItemId=" + fofoOrderItemId + "]";
183
	 
331
	}
184
	
332
 
185
}
333
}