Subversion Repositories SmartDukaan

Rev

Rev 30121 | Rev 31681 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
22653 ashik.ali 1
package com.spice.profitmandi.dao.entity.fofo;
22418 ashik.ali 2
 
30046 tejbeer 3
import com.spice.profitmandi.common.enumuration.ActivationType;
29936 amit.gupta 4
import com.spice.profitmandi.common.enumuration.CounterSize;
5
import com.spice.profitmandi.common.enumuration.FofoType;
6
import com.spice.profitmandi.dao.entity.user.Address;
7
 
8
import javax.persistence.*;
22418 ashik.ali 9
import java.io.Serializable;
24349 amit.gupta 10
import java.time.LocalDate;
28166 tejbeer 11
import java.time.LocalDateTime;
22418 ashik.ali 12
 
13
/**
14
 * This class basically contains store code details
15
 * 
16
 * @author ashikali
17
 *
18
 */
19
@Entity
27556 tejbeer 20
@Table(name = "fofo.fofo_store", schema = "fofo")
21
 
22
@NamedQueries({
23
 
30046 tejbeer 24
		@NamedQuery(name = "FofoStore.selectAllDtrUserIds", query = "select ua.userId from FofoStore fs join UserAccount ua on fs.id=ua.accountKey "
25
				+ "where ua.type='saholic' and fs.internal=false and fs.active=true"),
29926 amit.gupta 26
 
27594 tejbeer 27
		@NamedQuery(name = "FofoStore.selectGroupByBrandWarehousePartnerSale", query = "select new com.spice.profitmandi.dao.model.BrandWisePartnerSaleModel(foi.brand, "
29926 amit.gupta 28
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS integer ) else 0 end),"
27594 tejbeer 29
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
29926 amit.gupta 30
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS integer ) else 0 end),"
27594 tejbeer 31
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
32
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
33
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
34
				+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true "
27701 tejbeer 35
				+ "and foi.createTimestamp >= :lmtdStartDate and i.categoryId = :categoryId and fs.id in :fofoId"
36
				+ " group by foi.brand"),
27594 tejbeer 37
 
27592 tejbeer 38
		@NamedQuery(name = "FofoStore.selectGroupByWarehouseBrandWisePartnerSale", query = "select new com.spice.profitmandi.dao.model.WarehouseWiseBrandSaleModel("
39
				+ "(case when a.city in ('Noida', 'Ghaziabad')  and foi.brand = 'Vivo' then 7573 else fs.warehouseId end) AS col_0_0_,"
27574 tejbeer 40
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
41
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
42
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
43
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
44
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
45
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
27592 tejbeer 46
				+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId"
47
				+ " join com.spice.profitmandi.dao.entity.user.User u on u.id = fs.id join Address a on a.id = u.addressId"
48
				+ " where fo.cancelledTimestamp is null and fs.active = true"
27701 tejbeer 49
				+ " and foi.createTimestamp >= :lmtdStartDate and foi.brand = :brand and i.categoryId = :categoryId and fs.id in :fofoId"
27592 tejbeer 50
				+ " group by col_0_0_"),
27556 tejbeer 51
 
27670 tejbeer 52
		@NamedQuery(name = "FofoStore.selectWarehouseBrandItemSale", query = "select new com.spice.profitmandi.dao.model.WarehouseBrandWiseItemSaleModel(fs.warehouseId,i.id, i.brand, i.modelName, i.modelNumber,i.color,"
27574 tejbeer 53
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
54
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
55
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
56
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
57
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
58
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
27594 tejbeer 59
				+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true"
27701 tejbeer 60
				+ " and  foi.createTimestamp >= :lmtdStartDate and fs.warehouseId in :warehouseId and i.brand = :brand and i.categoryId = :categoryId and fs.id in :fofoId group by i.id"),
27594 tejbeer 61
 
62
		@NamedQuery(name = "FofoStore.selectGroupByBrandAccesoriesWarehousePartnerSale", query = "select new com.spice.profitmandi.dao.model.BrandWisePartnerSaleModel(foi.brand, "
63
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
64
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
65
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
66
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
67
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
68
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
27592 tejbeer 69
				+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true "
27701 tejbeer 70
				+ "and foi.createTimestamp >= :lmtdStartDate and i.categoryId != :categoryId and fs.id in :fofoId"
71
				+ " group by foi.brand"),
27556 tejbeer 72
 
27594 tejbeer 73
		@NamedQuery(name = "FofoStore.selectGroupByWarehouseAccesoriesBrandWisePartnerSale", query = "select new com.spice.profitmandi.dao.model.WarehouseWiseBrandSaleModel(fs.warehouseId,"
74
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
75
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
76
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
77
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
78
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
79
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
80
				+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true"
27701 tejbeer 81
				+ " and foi.createTimestamp >= :lmtdStartDate and foi.brand = :brand and i.categoryId != :categoryId and fs.id in :fofoId"
27594 tejbeer 82
				+ " group by fs.warehouseId"),
27592 tejbeer 83
 
27670 tejbeer 84
		@NamedQuery(name = "FofoStore.selectWarehouseAccesoriesBrandItemSale", query = "select new com.spice.profitmandi.dao.model.WarehouseBrandWiseItemSaleModel(fs.warehouseId,i.id, i.brand, i.modelName, i.modelNumber,i.color,"
27591 tejbeer 85
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
86
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
87
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
88
				+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
89
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
90
				+ "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
27556 tejbeer 91
				+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true"
27701 tejbeer 92
				+ " and  foi.createTimestamp >= :lmtdStartDate and fs.warehouseId in :warehouseId and i.brand = :brand and i.categoryId != :categoryId  and fs.id in :fofoId group by i.id"),
27556 tejbeer 93
 
27599 tejbeer 94
		@NamedQuery(name = "FofoStore.selectPartnerPendingIndentItem", query = "select new com.spice.profitmandi.dao.model.PartnerPendingIndentItemModel(o.retailerName,"
95
				+ " li.quantity, li.totalPrice)"
96
				+ " from FofoStore fs join Order o on fs.id = o.retailerId join  LineItem li on li.orderId = o.id "
97
				+ " where li.itemId = :itemId and fs.warehouseId = :warehouseId and o.status = 3"),
98
 
27670 tejbeer 99
		@NamedQuery(name = "FofoStore.selectUnbilledActivateStockGroupByBrand", query = "select new com.spice.profitmandi.dao.model.BrandWiseUnbilledActivateStockModel(i.brand,"
27676 tejbeer 100
				+ "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
27670 tejbeer 101
				+ "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice  AS int) else 0 end))"
102
				+ " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
27701 tejbeer 103
				+ " where fs.active = true and ii.goodQuantity >= 1 and fs.id in :fofoId group by i.brand"),
27670 tejbeer 104
 
105
		@NamedQuery(name = "FofoStore.selectUnbilledActivateStockGroupByWarehouse", query = "select new com.spice.profitmandi.dao.model.WarehouseWiseBrandUnbilledActivatedModel(fs.warehouseId,"
27676 tejbeer 106
				+ "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
27670 tejbeer 107
				+ "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice  AS int) else 0 end))"
108
				+ " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
27701 tejbeer 109
				+ " where fs.active = true and ii.goodQuantity >= 1 and i.brand = :brand and fs.id in :fofoId group by fs.warehouseId"),
27670 tejbeer 110
 
111
		@NamedQuery(name = "FofoStore.selectWarehouseBrandItemUnbilledActivateStock", query = "select new com.spice.profitmandi.dao.model.WarehouseBrandItemUnbilledActivatedModel(fs.warehouseId,i.id, i.brand, i.modelName, i.modelNumber,i.color,"
27676 tejbeer 112
				+ "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
27670 tejbeer 113
				+ "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice  AS int) else 0 end))"
114
				+ " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
27701 tejbeer 115
				+ " where fs.active = true and ii.goodQuantity >= 1 and i.brand = :brand and fs.warehouseId in :warehouseId and fs.id in :fofoId  group by i.id"),
27670 tejbeer 116
 
30279 tejbeer 117
		@NamedQuery(name = "FofoStore.selectGroupByBrandLms", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(foi.brand, DATE_FORMAT(fo.createTimestamp, :groupParameter),sum(cast(foi.mop*foi.quantity As int)))"
28451 tejbeer 118
				+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true "
30279 tejbeer 119
				+ " and (foi.createTimestamp between :lmsStartDate and :endDate) and i.categoryId = :categoryId and fs.id in :fofoId and fs.warehouseId in :warehouseId"
120
				+ " group by foi.brand,DATE_FORMAT(fo.createTimestamp, :groupParameter)"), })
27599 tejbeer 121
 
27556 tejbeer 122
public class FofoStore implements Serializable {
123
 
22418 ashik.ali 124
	private static final long serialVersionUID = 1L;
27556 tejbeer 125
 
22418 ashik.ali 126
	public FofoStore() {
127
	}
27556 tejbeer 128
 
22418 ashik.ali 129
	@Id
27556 tejbeer 130
	@Column(name = "id", unique = true, updatable = false)
22418 ashik.ali 131
	private int id;
27556 tejbeer 132
 
133
	@Column(name = "code", unique = true)
22418 ashik.ali 134
	private String code;
27556 tejbeer 135
 
23847 ashik.ali 136
	@Column(name = "latitude")
137
	private String latitude;
27556 tejbeer 138
 
23847 ashik.ali 139
	@Column(name = "longitude")
140
	private String longitude;
27556 tejbeer 141
 
142
	@Column(name = "counter_size")
23786 amit.gupta 143
	@Enumerated(EnumType.STRING)
144
	private CounterSize counterSize = CounterSize.TEN_LAC;
27556 tejbeer 145
 
146
	@Column(name = "warehouse_id")
25069 amit.gupta 147
	private int warehouseId;
27556 tejbeer 148
 
149
	@Column(name = "minimum_investment")
23884 amit.gupta 150
	private float minimumInvestment;
27556 tejbeer 151
 
152
	@Column(name = "grace_date")
24349 amit.gupta 153
	private LocalDate graceDate;
27556 tejbeer 154
 
155
	@Column(name = "investment_ok")
25276 amit.gupta 156
	private boolean investmentOk;
27556 tejbeer 157
 
27903 tejbeer 158
	@Column
159
	private boolean active = true;
160
 
29518 amit.gupta 161
	@Column
29497 amit.gupta 162
	private String pan;
163
 
164
	@Transient
27903 tejbeer 165
	private Address userAddress;
30046 tejbeer 166
 
27903 tejbeer 167
	@Column(name = "internal")
168
	private boolean internal;
169
 
28166 tejbeer 170
	@Column(name = "bags_last_credited")
171
	private LocalDateTime bagsLastCredited;
28825 tejbeer 172
 
173
	@Column(name = "fofo_type")
174
	@Enumerated(EnumType.STRING)
175
	private FofoType fofoType;
176
 
30046 tejbeer 177
	@Column(name = "activation_type")
178
	@Enumerated(EnumType.STRING)
30121 amit.gupta 179
	private ActivationType activationType = ActivationType.ACTIVE;
30046 tejbeer 180
 
28709 amit.gupta 181
	@Column(name = "active_timestamp")
182
	private LocalDateTime activeTimeStamp;
28166 tejbeer 183
 
30046 tejbeer 184
	public ActivationType getActivationType() {
185
		return activationType;
186
	}
187
 
188
	public void setActivationType(ActivationType activationType) {
189
		this.activationType = activationType;
190
	}
191
 
28166 tejbeer 192
	public LocalDateTime getBagsLastCredited() {
193
		return bagsLastCredited;
194
	}
195
 
196
	public void setBagsLastCredited(LocalDateTime bagsLastCredited) {
197
		this.bagsLastCredited = bagsLastCredited;
198
	}
199
 
27903 tejbeer 200
	public boolean isInternal() {
201
		return internal;
202
	}
203
 
204
	public void setInternal(boolean internal) {
205
		this.internal = internal;
206
	}
207
 
208
	public int getWarehouseId() {
209
		return warehouseId;
210
	}
211
 
212
	public void setWarehouseId(int warehouseId) {
213
		this.warehouseId = warehouseId;
214
	}
215
 
25276 amit.gupta 216
	public boolean isInvestmentOk() {
217
		return investmentOk;
218
	}
27556 tejbeer 219
 
25276 amit.gupta 220
	public void setInvestmentOk(boolean investmentOk) {
221
		this.investmentOk = investmentOk;
222
	}
223
 
27556 tejbeer 224
	@Column(name = "grace_count")
24349 amit.gupta 225
	private int graceCount;
24843 govind 226
 
29497 amit.gupta 227
	public String getPan() {
228
		return pan;
229
	}
230
 
231
	public void setPan(String pan) {
232
		this.pan = pan;
233
	}
234
 
24349 amit.gupta 235
	public int getGraceCount() {
236
		return graceCount;
237
	}
27556 tejbeer 238
 
24843 govind 239
	public boolean isActive() {
240
		return active;
241
	}
27556 tejbeer 242
 
24843 govind 243
	public void setActive(boolean active) {
244
		this.active = active;
245
	}
27556 tejbeer 246
 
24349 amit.gupta 247
	public void setGraceCount(int graceCount) {
248
		this.graceCount = graceCount;
249
	}
27556 tejbeer 250
 
24349 amit.gupta 251
	public LocalDate getGraceDate() {
252
		return graceDate;
253
	}
27556 tejbeer 254
 
24349 amit.gupta 255
	public void setGraceDate(LocalDate graceDate) {
256
		this.graceDate = graceDate;
257
	}
27556 tejbeer 258
 
23884 amit.gupta 259
	public float getMinimumInvestment() {
260
		return minimumInvestment;
261
	}
27556 tejbeer 262
 
23884 amit.gupta 263
	public void setMinimumInvestment(float minimumInvestment) {
264
		this.minimumInvestment = minimumInvestment;
265
	}
266
 
27556 tejbeer 267
	/*
268
	 * public int getCreditCycle() { return creditCycle; } public void
269
	 * setCreditCycle(int creditCycle) { this.creditCycle = creditCycle; }
270
	 */
23786 amit.gupta 271
	public CounterSize getCounterSize() {
23716 amit.gupta 272
		return counterSize;
273
	}
27556 tejbeer 274
 
23786 amit.gupta 275
	public void setCounterSize(CounterSize counterSize) {
23716 amit.gupta 276
		this.counterSize = counterSize;
277
	}
27556 tejbeer 278
 
22418 ashik.ali 279
	public int getId() {
280
		return id;
281
	}
27556 tejbeer 282
 
22418 ashik.ali 283
	public void setId(int id) {
284
		this.id = id;
285
	}
27556 tejbeer 286
 
287
	public String getCode() {
22418 ashik.ali 288
		return code;
289
	}
27556 tejbeer 290
 
291
	public void setCode(String code) {
22418 ashik.ali 292
		this.code = code;
293
	}
27556 tejbeer 294
 
295
	public String getLatitude() {
23847 ashik.ali 296
		return latitude;
297
	}
27556 tejbeer 298
 
299
	public void setLatitude(String latitude) {
23847 ashik.ali 300
		this.latitude = latitude;
301
	}
27556 tejbeer 302
 
303
	public String getLongitude() {
23847 ashik.ali 304
		return longitude;
305
	}
27556 tejbeer 306
 
307
	public void setLongitude(String longitude) {
23847 ashik.ali 308
		this.longitude = longitude;
309
	}
27556 tejbeer 310
 
23786 amit.gupta 311
	public Address getUserAddress() {
312
		return userAddress;
313
	}
27556 tejbeer 314
 
23786 amit.gupta 315
	public void setUserAddress(Address userAddress) {
316
		this.userAddress = userAddress;
317
	}
27556 tejbeer 318
 
28709 amit.gupta 319
	public LocalDateTime getActiveTimeStamp() {
320
		return activeTimeStamp;
321
	}
322
 
323
	public void setActiveTimeStamp(LocalDateTime activeTimeStamp) {
324
		this.activeTimeStamp = activeTimeStamp;
325
	}
326
 
28825 tejbeer 327
	public FofoType getFofoType() {
328
		return fofoType;
329
	}
330
 
331
	public void setFofoType(FofoType fofoType) {
332
		this.fofoType = fofoType;
333
	}
334
 
22418 ashik.ali 335
	@Override
336
	public int hashCode() {
337
		final int prime = 31;
338
		int result = 1;
30046 tejbeer 339
		result = prime * result + ((activationType == null) ? 0 : activationType.hashCode());
25276 amit.gupta 340
		result = prime * result + (active ? 1231 : 1237);
28825 tejbeer 341
		result = prime * result + ((activeTimeStamp == null) ? 0 : activeTimeStamp.hashCode());
342
		result = prime * result + ((bagsLastCredited == null) ? 0 : bagsLastCredited.hashCode());
24349 amit.gupta 343
		result = prime * result + ((code == null) ? 0 : code.hashCode());
344
		result = prime * result + ((counterSize == null) ? 0 : counterSize.hashCode());
28825 tejbeer 345
		result = prime * result + ((fofoType == null) ? 0 : fofoType.hashCode());
24349 amit.gupta 346
		result = prime * result + graceCount;
347
		result = prime * result + ((graceDate == null) ? 0 : graceDate.hashCode());
22418 ashik.ali 348
		result = prime * result + id;
27903 tejbeer 349
		result = prime * result + (internal ? 1231 : 1237);
25276 amit.gupta 350
		result = prime * result + (investmentOk ? 1231 : 1237);
24349 amit.gupta 351
		result = prime * result + ((latitude == null) ? 0 : latitude.hashCode());
352
		result = prime * result + ((longitude == null) ? 0 : longitude.hashCode());
353
		result = prime * result + Float.floatToIntBits(minimumInvestment);
30046 tejbeer 354
		result = prime * result + ((pan == null) ? 0 : pan.hashCode());
24349 amit.gupta 355
		result = prime * result + ((userAddress == null) ? 0 : userAddress.hashCode());
25276 amit.gupta 356
		result = prime * result + warehouseId;
22418 ashik.ali 357
		return result;
358
	}
27556 tejbeer 359
 
22418 ashik.ali 360
	@Override
361
	public boolean equals(Object obj) {
362
		if (this == obj)
363
			return true;
364
		if (obj == null)
365
			return false;
366
		if (getClass() != obj.getClass())
367
			return false;
368
		FofoStore other = (FofoStore) obj;
30046 tejbeer 369
		if (activationType != other.activationType)
370
			return false;
25276 amit.gupta 371
		if (active != other.active)
372
			return false;
28825 tejbeer 373
		if (activeTimeStamp == null) {
374
			if (other.activeTimeStamp != null)
375
				return false;
376
		} else if (!activeTimeStamp.equals(other.activeTimeStamp))
377
			return false;
378
		if (bagsLastCredited == null) {
379
			if (other.bagsLastCredited != null)
380
				return false;
381
		} else if (!bagsLastCredited.equals(other.bagsLastCredited))
382
			return false;
24349 amit.gupta 383
		if (code == null) {
384
			if (other.code != null)
385
				return false;
386
		} else if (!code.equals(other.code))
387
			return false;
388
		if (counterSize != other.counterSize)
389
			return false;
28825 tejbeer 390
		if (fofoType != other.fofoType)
391
			return false;
24349 amit.gupta 392
		if (graceCount != other.graceCount)
393
			return false;
394
		if (graceDate == null) {
395
			if (other.graceDate != null)
396
				return false;
397
		} else if (!graceDate.equals(other.graceDate))
398
			return false;
22418 ashik.ali 399
		if (id != other.id)
400
			return false;
27903 tejbeer 401
		if (internal != other.internal)
402
			return false;
25276 amit.gupta 403
		if (investmentOk != other.investmentOk)
404
			return false;
24349 amit.gupta 405
		if (latitude == null) {
406
			if (other.latitude != null)
407
				return false;
408
		} else if (!latitude.equals(other.latitude))
409
			return false;
410
		if (longitude == null) {
411
			if (other.longitude != null)
412
				return false;
413
		} else if (!longitude.equals(other.longitude))
414
			return false;
415
		if (Float.floatToIntBits(minimumInvestment) != Float.floatToIntBits(other.minimumInvestment))
416
			return false;
30046 tejbeer 417
		if (pan == null) {
418
			if (other.pan != null)
419
				return false;
420
		} else if (!pan.equals(other.pan))
421
			return false;
24349 amit.gupta 422
		if (userAddress == null) {
423
			if (other.userAddress != null)
424
				return false;
425
		} else if (!userAddress.equals(other.userAddress))
426
			return false;
25276 amit.gupta 427
		if (warehouseId != other.warehouseId)
428
			return false;
22418 ashik.ali 429
		return true;
430
	}
27556 tejbeer 431
 
22418 ashik.ali 432
	@Override
433
	public String toString() {
23884 amit.gupta 434
		return "FofoStore [id=" + id + ", code=" + code + ", latitude=" + latitude + ", longitude=" + longitude
25069 amit.gupta 435
				+ ", counterSize=" + counterSize + ", warehouseId=" + warehouseId + ", minimumInvestment="
27903 tejbeer 436
				+ minimumInvestment + ", graceDate=" + graceDate + ", investmentOk=" + investmentOk + ", active="
30046 tejbeer 437
				+ active + ", pan=" + pan + ", userAddress=" + userAddress + ", internal=" + internal
438
				+ ", bagsLastCredited=" + bagsLastCredited + ", fofoType=" + fofoType + ", activationType="
439
				+ activationType + ", activeTimeStamp=" + activeTimeStamp + ", graceCount=" + graceCount + "]";
22418 ashik.ali 440
	}
27556 tejbeer 441
 
22418 ashik.ali 442
}