Subversion Repositories SmartDukaan

Rev

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