Subversion Repositories SmartDukaan

Rev

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

Rev 29707 Rev 34194
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.LocalDate;
4
import java.time.LocalDateTime;
4
import java.time.LocalDateTime;
-
 
5
import java.util.Objects;
5
import java.util.Set;
6
import java.util.Set;
6
 
7
 
7
public class InsuranceModel {
8
public class InsuranceModel {
8
	private String brand;
9
	private String brand;
9
	private String color;
10
	private String color;
Line 12... Line 13...
12
	private LocalDateTime mfgDate;
13
	private LocalDateTime mfgDate;
13
	private LocalDate wmfgDate;
14
	private LocalDate wmfgDate;
14
	private String modelName;
15
	private String modelName;
15
	private float insuranceAmount;
16
	private float insuranceAmount;
16
	private String insuranceId;
17
	private String insuranceId;
-
 
18
	private String insuranceUId;
17
	private float deviceSellingPrice;
19
	private float deviceSellingPrice;
18
	private String serialNumber;
20
	private String serialNumber;
19
	private String providerName;
21
	private String providerName;
20
	private String providerId;
22
	private String providerId;
21
	private String underWriterName;
23
	private String underWriterName;
Line 129... Line 131...
129
 
131
 
130
	public void setInsuranceId(String insuranceId) {
132
	public void setInsuranceId(String insuranceId) {
131
		this.insuranceId = insuranceId;
133
		this.insuranceId = insuranceId;
132
	}
134
	}
133
 
135
 
-
 
136
	public String getInsuranceUId() {
-
 
137
		return insuranceUId;
-
 
138
	}
-
 
139
 
-
 
140
	public void setInsuranceUId(String insuranceUId) {
-
 
141
		this.insuranceUId = insuranceUId;
-
 
142
	}
-
 
143
 
134
	public String getProviderName() {
144
	public String getProviderName() {
135
		return providerName;
145
		return providerName;
136
	}
146
	}
137
 
147
 
138
	public void setProviderName(String providerName) {
148
	public void setProviderName(String providerName) {
Line 194... Line 204...
194
	public void setDob(LocalDate dob) {
204
	public void setDob(LocalDate dob) {
195
		this.dob = dob;
205
		this.dob = dob;
196
	}
206
	}
197
 
207
 
198
	@Override
208
	@Override
199
	public int hashCode() {
209
	public boolean equals(Object o) {
200
		final int prime = 31;
-
 
201
		int result = 1;
210
		if (this == o) return true;
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;
-
 
206
		result = prime * result + Float.floatToIntBits(deviceSellingPrice);
-
 
207
		result = prime * result + ((dob == null) ? 0 : dob.hashCode());
211
		if (o == null || getClass() != o.getClass()) return false;
208
		result = prime * result + fofoOrderId;
-
 
209
		result = prime * result + fofoOrderItemId;
212
		InsuranceModel that = (InsuranceModel) o;
210
		result = prime * result + Float.floatToIntBits(insuranceAmount);
-
 
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());
-
 
214
		result = prime * result + ((modelName == null) ? 0 : modelName.hashCode());
-
 
215
		result = prime * result + ((providerId == null) ? 0 : providerId.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());
-
 
219
		result = prime * result + ((underWriterId == null) ? 0 : underWriterId.hashCode());
-
 
220
		result = prime * result + ((underWriterName == null) ? 0 : underWriterName.hashCode());
-
 
221
		result = prime * result + ((wmfgDate == null) ? 0 : wmfgDate.hashCode());
-
 
222
		return result;
213
		return Float.compare(insuranceAmount, that.insuranceAmount) == 0 && Float.compare(deviceSellingPrice, that.deviceSellingPrice) == 0 && customerId == that.customerId && fofoOrderId == that.fofoOrderId && fofoOrderItemId == that.fofoOrderItemId && Objects.equals(brand, that.brand) && Objects.equals(color, that.color) && Objects.equals(ram, that.ram) && Objects.equals(memory, that.memory) && Objects.equals(mfgDate, that.mfgDate) && Objects.equals(wmfgDate, that.wmfgDate) && Objects.equals(modelName, that.modelName) && Objects.equals(insuranceId, that.insuranceId) && Objects.equals(insuranceUId, that.insuranceUId) && Objects.equals(serialNumber, that.serialNumber) && Objects.equals(providerName, that.providerName) && Objects.equals(providerId, that.providerId) && Objects.equals(underWriterName, that.underWriterName) && Objects.equals(underWriterId, that.underWriterId) && Objects.equals(customerEmail, that.customerEmail) && Objects.equals(dob, that.dob) && Objects.equals(paymentOptions, that.paymentOptions);
223
	}
214
	}
224
 
215
 
225
	@Override
216
	@Override
226
	public boolean equals(Object obj) {
217
	public int hashCode() {
227
		if (this == obj)
-
 
228
			return true;
-
 
229
		if (obj == null)
-
 
230
			return false;
-
 
231
		if (getClass() != obj.getClass())
-
 
232
			return false;
-
 
233
		InsuranceModel other = (InsuranceModel) obj;
-
 
234
		if (brand == null) {
-
 
235
			if (other.brand != null)
-
 
236
				return false;
-
 
237
		} else if (!brand.equals(other.brand))
-
 
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;
-
 
251
		if (Float.floatToIntBits(deviceSellingPrice) != Float.floatToIntBits(other.deviceSellingPrice))
218
		return Objects.hash(brand, color, ram, memory, mfgDate, wmfgDate, modelName, insuranceAmount, insuranceId, insuranceUId, deviceSellingPrice, serialNumber, providerName, providerId, underWriterName, underWriterId, customerId, customerEmail, dob, fofoOrderId, fofoOrderItemId, paymentOptions);
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;
-
 
262
		if (Float.floatToIntBits(insuranceAmount) != Float.floatToIntBits(other.insuranceAmount))
-
 
263
			return false;
-
 
264
		if (insuranceId == null) {
-
 
265
			if (other.insuranceId != null)
-
 
266
				return false;
-
 
267
		} else if (!insuranceId.equals(other.insuranceId))
-
 
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;
-
 
279
		if (modelName == null) {
-
 
280
			if (other.modelName != null)
-
 
281
				return false;
-
 
282
		} else if (!modelName.equals(other.modelName))
-
 
283
			return false;
-
 
284
		if (providerId == null) {
-
 
285
			if (other.providerId != null)
-
 
286
				return false;
-
 
287
		} else if (!providerId.equals(other.providerId))
-
 
288
			return false;
-
 
289
		if (providerName == null) {
-
 
290
			if (other.providerName != null)
-
 
291
				return false;
-
 
292
		} else if (!providerName.equals(other.providerName))
-
 
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;
-
 
304
		if (underWriterId == null) {
-
 
305
			if (other.underWriterId != null)
-
 
306
				return false;
-
 
307
		} else if (!underWriterId.equals(other.underWriterId))
-
 
308
			return false;
-
 
309
		if (underWriterName == null) {
-
 
310
			if (other.underWriterName != null)
-
 
311
				return false;
-
 
312
		} else if (!underWriterName.equals(other.underWriterName))
-
 
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;
-
 
319
		return true;
-
 
320
	}
219
	}
321
 
220
 
322
	@Override
221
	@Override
323
	public String toString() {
222
	public String toString() {
-
 
223
		return "InsuranceModel{" +
-
 
224
				"brand='" + brand + '\'' +
-
 
225
				", color='" + color + '\'' +
-
 
226
				", ram='" + ram + '\'' +
-
 
227
				", memory='" + memory + '\'' +
-
 
228
				", mfgDate=" + mfgDate +
-
 
229
				", wmfgDate=" + wmfgDate +
324
		return "InsuranceModel [brand=" + brand + ", color=" + color + ", ram=" + ram + ", memory=" + memory
230
				", modelName='" + modelName + '\'' +
325
				+ ", mfgDate=" + mfgDate + ", wmfgDate=" + wmfgDate + ", modelName=" + modelName + ", insuranceAmount="
231
				", insuranceAmount=" + insuranceAmount +
-
 
232
				", insuranceId='" + insuranceId + '\'' +
-
 
233
				", insuranceUId='" + insuranceUId + '\'' +
326
				+ insuranceAmount + ", insuranceId=" + insuranceId + ", deviceSellingPrice=" + deviceSellingPrice
234
				", deviceSellingPrice=" + deviceSellingPrice +
-
 
235
				", serialNumber='" + serialNumber + '\'' +
327
				+ ", serialNumber=" + serialNumber + ", providerName=" + providerName + ", providerId=" + providerId
236
				", providerName='" + providerName + '\'' +
-
 
237
				", providerId='" + providerId + '\'' +
328
				+ ", underWriterName=" + underWriterName + ", underWriterId=" + underWriterId + ", customerId="
238
				", underWriterName='" + underWriterName + '\'' +
-
 
239
				", underWriterId='" + underWriterId + '\'' +
-
 
240
				", customerId=" + customerId +
329
				+ customerId + ", customerEmail=" + customerEmail + ", dob=" + dob + ", fofoOrderId=" + fofoOrderId
241
				", customerEmail='" + customerEmail + '\'' +
-
 
242
				", dob=" + dob +
-
 
243
				", fofoOrderId=" + fofoOrderId +
330
				+ ", fofoOrderItemId=" + fofoOrderItemId + "]";
244
				", fofoOrderItemId=" + fofoOrderItemId +
-
 
245
				", paymentOptions=" + paymentOptions +
-
 
246
				'}';
331
	}
247
	}
332
 
248
 
333
}
249
}