| 28493 |
tejbeer |
1 |
package com.spice.profitmandi.dao.entity.inventory;
|
|
|
2 |
|
|
|
3 |
import java.time.LocalDateTime;
|
|
|
4 |
|
|
|
5 |
import javax.persistence.Column;
|
|
|
6 |
import javax.persistence.Entity;
|
|
|
7 |
import javax.persistence.EnumType;
|
|
|
8 |
import javax.persistence.Enumerated;
|
|
|
9 |
import javax.persistence.GeneratedValue;
|
|
|
10 |
import javax.persistence.GenerationType;
|
|
|
11 |
import javax.persistence.Id;
|
|
|
12 |
import javax.persistence.Table;
|
|
|
13 |
|
|
|
14 |
import com.spice.profitmandi.dao.enumuration.inventory.InventoryType;
|
|
|
15 |
import com.spice.profitmandi.dao.enumuration.inventory.WarehouseType;
|
|
|
16 |
|
|
|
17 |
@Entity
|
|
|
18 |
@Table(name = "inventory.warehouse", schema = "inventory")
|
|
|
19 |
public class Warehouse {
|
|
|
20 |
|
|
|
21 |
@Id
|
|
|
22 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
23 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
24 |
private int id;
|
|
|
25 |
private String displayName;
|
|
|
26 |
private String location;
|
|
|
27 |
private int status;
|
|
|
28 |
private LocalDateTime addedOn;
|
|
|
29 |
private LocalDateTime lastCheckedOn;
|
|
|
30 |
private String tinNumber;
|
|
|
31 |
private String pincode;
|
|
|
32 |
private String vendorString;
|
|
|
33 |
private String gstin;
|
|
|
34 |
|
| 28949 |
amit.gupta |
35 |
private Integer logisticsLocation;
|
| 28664 |
amit.gupta |
36 |
private Integer billingType;
|
| 28493 |
tejbeer |
37 |
@Enumerated(EnumType.STRING)
|
|
|
38 |
private WarehouseType warehouseType;
|
|
|
39 |
|
|
|
40 |
@Enumerated(EnumType.STRING)
|
|
|
41 |
private InventoryType inventoryType;
|
|
|
42 |
@Column(name = "vendor_id")
|
|
|
43 |
private int vendor;
|
|
|
44 |
|
|
|
45 |
private int shippingWarehouseId;
|
|
|
46 |
private int billingWarehouseId;
|
|
|
47 |
private int isAvailabilityMonitored;
|
|
|
48 |
private long transferDelayInHours;
|
|
|
49 |
@Column(name = "state_id")
|
|
|
50 |
private int stateId;
|
| 28665 |
amit.gupta |
51 |
private Integer source;
|
| 28493 |
tejbeer |
52 |
|
|
|
53 |
public int getId() {
|
|
|
54 |
return id;
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
public void setId(int id) {
|
|
|
58 |
this.id = id;
|
|
|
59 |
}
|
|
|
60 |
|
|
|
61 |
public String getDisplayName() {
|
|
|
62 |
return displayName;
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
public void setDisplayName(String displayName) {
|
|
|
66 |
this.displayName = displayName;
|
|
|
67 |
}
|
|
|
68 |
|
|
|
69 |
public String getLocation() {
|
|
|
70 |
return location;
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
public void setLocation(String location) {
|
|
|
74 |
this.location = location;
|
|
|
75 |
}
|
|
|
76 |
|
|
|
77 |
public int getStatus() {
|
|
|
78 |
return status;
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
public void setStatus(int status) {
|
|
|
82 |
this.status = status;
|
|
|
83 |
}
|
|
|
84 |
|
|
|
85 |
public LocalDateTime getAddedOn() {
|
|
|
86 |
return addedOn;
|
|
|
87 |
}
|
|
|
88 |
|
|
|
89 |
public void setAddedOn(LocalDateTime addedOn) {
|
|
|
90 |
this.addedOn = addedOn;
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
public LocalDateTime getLastCheckedOn() {
|
|
|
94 |
return lastCheckedOn;
|
|
|
95 |
}
|
|
|
96 |
|
|
|
97 |
public void setLastCheckedOn(LocalDateTime lastCheckedOn) {
|
|
|
98 |
this.lastCheckedOn = lastCheckedOn;
|
|
|
99 |
}
|
|
|
100 |
|
|
|
101 |
public String getTinNumber() {
|
|
|
102 |
return tinNumber;
|
|
|
103 |
}
|
|
|
104 |
|
|
|
105 |
public void setTinNumber(String tinNumber) {
|
|
|
106 |
this.tinNumber = tinNumber;
|
|
|
107 |
}
|
|
|
108 |
|
|
|
109 |
public String getPincode() {
|
|
|
110 |
return pincode;
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
public void setPincode(String pincode) {
|
|
|
114 |
this.pincode = pincode;
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
public String getVendorString() {
|
|
|
118 |
return vendorString;
|
|
|
119 |
}
|
|
|
120 |
|
|
|
121 |
public void setVendorString(String vendorString) {
|
|
|
122 |
this.vendorString = vendorString;
|
|
|
123 |
}
|
|
|
124 |
|
|
|
125 |
public String getGstin() {
|
|
|
126 |
return gstin;
|
|
|
127 |
}
|
|
|
128 |
|
|
|
129 |
public void setGstin(String gstin) {
|
|
|
130 |
this.gstin = gstin;
|
|
|
131 |
}
|
|
|
132 |
|
| 28949 |
amit.gupta |
133 |
public Integer getLogisticsLocation() {
|
| 28493 |
tejbeer |
134 |
return logisticsLocation;
|
|
|
135 |
}
|
|
|
136 |
|
| 28949 |
amit.gupta |
137 |
public void setLogisticsLocation(Integer logisticsLocation) {
|
| 28493 |
tejbeer |
138 |
this.logisticsLocation = logisticsLocation;
|
|
|
139 |
}
|
|
|
140 |
|
| 28664 |
amit.gupta |
141 |
public Integer getBillingType() {
|
| 28493 |
tejbeer |
142 |
return billingType;
|
|
|
143 |
}
|
|
|
144 |
|
| 28664 |
amit.gupta |
145 |
public void setBillingType(Integer billingType) {
|
| 28493 |
tejbeer |
146 |
this.billingType = billingType;
|
|
|
147 |
}
|
|
|
148 |
|
|
|
149 |
public WarehouseType getWarehouseType() {
|
|
|
150 |
return warehouseType;
|
|
|
151 |
}
|
|
|
152 |
|
|
|
153 |
public void setWarehouseType(WarehouseType warehouseType) {
|
|
|
154 |
this.warehouseType = warehouseType;
|
|
|
155 |
}
|
|
|
156 |
|
|
|
157 |
public InventoryType getInventoryType() {
|
|
|
158 |
return inventoryType;
|
|
|
159 |
}
|
|
|
160 |
|
|
|
161 |
public void setInventoryType(InventoryType inventoryType) {
|
|
|
162 |
this.inventoryType = inventoryType;
|
|
|
163 |
}
|
|
|
164 |
|
|
|
165 |
public int getVendor() {
|
|
|
166 |
return vendor;
|
|
|
167 |
}
|
|
|
168 |
|
|
|
169 |
public void setVendor(int vendor) {
|
|
|
170 |
this.vendor = vendor;
|
|
|
171 |
}
|
|
|
172 |
|
|
|
173 |
public int getShippingWarehouseId() {
|
|
|
174 |
return shippingWarehouseId;
|
|
|
175 |
}
|
|
|
176 |
|
|
|
177 |
public void setShippingWarehouseId(int shippingWarehouseId) {
|
|
|
178 |
this.shippingWarehouseId = shippingWarehouseId;
|
|
|
179 |
}
|
|
|
180 |
|
|
|
181 |
public int getBillingWarehouseId() {
|
|
|
182 |
return billingWarehouseId;
|
|
|
183 |
}
|
|
|
184 |
|
|
|
185 |
public void setBillingWarehouseId(int billingWarehouseId) {
|
|
|
186 |
this.billingWarehouseId = billingWarehouseId;
|
|
|
187 |
}
|
|
|
188 |
|
|
|
189 |
public int getIsAvailabilityMonitored() {
|
|
|
190 |
return isAvailabilityMonitored;
|
|
|
191 |
}
|
|
|
192 |
|
|
|
193 |
public void setIsAvailabilityMonitored(int isAvailabilityMonitored) {
|
|
|
194 |
this.isAvailabilityMonitored = isAvailabilityMonitored;
|
|
|
195 |
}
|
|
|
196 |
|
|
|
197 |
public long getTransferDelayInHours() {
|
|
|
198 |
return transferDelayInHours;
|
|
|
199 |
}
|
|
|
200 |
|
|
|
201 |
public void setTransferDelayInHours(long transferDelayInHours) {
|
|
|
202 |
this.transferDelayInHours = transferDelayInHours;
|
|
|
203 |
}
|
|
|
204 |
|
|
|
205 |
public int getStateId() {
|
|
|
206 |
return stateId;
|
|
|
207 |
}
|
|
|
208 |
|
| 28665 |
amit.gupta |
209 |
public void setStateId(Integer stateId) {
|
| 28493 |
tejbeer |
210 |
this.stateId = stateId;
|
|
|
211 |
}
|
|
|
212 |
|
| 28665 |
amit.gupta |
213 |
public Integer getSource() {
|
| 28493 |
tejbeer |
214 |
return source;
|
|
|
215 |
}
|
|
|
216 |
|
|
|
217 |
public void setSource(int source) {
|
|
|
218 |
this.source = source;
|
|
|
219 |
}
|
|
|
220 |
|
|
|
221 |
@Override
|
|
|
222 |
public String toString() {
|
|
|
223 |
return "Warehouse [id=" + id + ", displayName=" + displayName + ", location=" + location + ", status=" + status
|
|
|
224 |
+ ", addedOn=" + addedOn + ", lastCheckedOn=" + lastCheckedOn + ", tinNumber=" + tinNumber
|
|
|
225 |
+ ", pincode=" + pincode + ", vendorString=" + vendorString + ", gstin=" + gstin
|
|
|
226 |
+ ", logisticsLocation=" + logisticsLocation + ", billingType=" + billingType + ", warehouseType="
|
|
|
227 |
+ warehouseType + ", inventoryType=" + inventoryType + ", vendor=" + vendor + ", shippingWarehouseId="
|
|
|
228 |
+ shippingWarehouseId + ", billingWarehouseId=" + billingWarehouseId + ", isAvailabilityMonitored="
|
|
|
229 |
+ isAvailabilityMonitored + ", transferDelayInHours=" + transferDelayInHours + ", stateId=" + stateId
|
|
|
230 |
+ ", source=" + source + "]";
|
|
|
231 |
}
|
| 28949 |
amit.gupta |
232 |
|
| 28493 |
tejbeer |
233 |
|
| 28949 |
amit.gupta |
234 |
@Override
|
|
|
235 |
public int hashCode() {
|
|
|
236 |
final int prime = 31;
|
|
|
237 |
int result = 1;
|
|
|
238 |
result = prime * result + ((addedOn == null) ? 0 : addedOn.hashCode());
|
|
|
239 |
result = prime * result + ((billingType == null) ? 0 : billingType.hashCode());
|
|
|
240 |
result = prime * result + billingWarehouseId;
|
|
|
241 |
result = prime * result + ((displayName == null) ? 0 : displayName.hashCode());
|
|
|
242 |
result = prime * result + ((gstin == null) ? 0 : gstin.hashCode());
|
|
|
243 |
result = prime * result + id;
|
|
|
244 |
result = prime * result + ((inventoryType == null) ? 0 : inventoryType.hashCode());
|
|
|
245 |
result = prime * result + isAvailabilityMonitored;
|
|
|
246 |
result = prime * result + ((lastCheckedOn == null) ? 0 : lastCheckedOn.hashCode());
|
|
|
247 |
result = prime * result + ((location == null) ? 0 : location.hashCode());
|
|
|
248 |
result = prime * result + ((logisticsLocation == null) ? 0 : logisticsLocation.hashCode());
|
|
|
249 |
result = prime * result + ((pincode == null) ? 0 : pincode.hashCode());
|
|
|
250 |
result = prime * result + shippingWarehouseId;
|
|
|
251 |
result = prime * result + ((source == null) ? 0 : source.hashCode());
|
|
|
252 |
result = prime * result + stateId;
|
|
|
253 |
result = prime * result + status;
|
|
|
254 |
result = prime * result + ((tinNumber == null) ? 0 : tinNumber.hashCode());
|
|
|
255 |
result = prime * result + (int) (transferDelayInHours ^ (transferDelayInHours >>> 32));
|
|
|
256 |
result = prime * result + vendor;
|
|
|
257 |
result = prime * result + ((vendorString == null) ? 0 : vendorString.hashCode());
|
|
|
258 |
result = prime * result + ((warehouseType == null) ? 0 : warehouseType.hashCode());
|
|
|
259 |
return result;
|
|
|
260 |
}
|
|
|
261 |
|
|
|
262 |
@Override
|
|
|
263 |
public boolean equals(Object obj) {
|
|
|
264 |
if (this == obj)
|
|
|
265 |
return true;
|
|
|
266 |
if (obj == null)
|
|
|
267 |
return false;
|
|
|
268 |
if (getClass() != obj.getClass())
|
|
|
269 |
return false;
|
|
|
270 |
Warehouse other = (Warehouse) obj;
|
|
|
271 |
if (addedOn == null) {
|
|
|
272 |
if (other.addedOn != null)
|
|
|
273 |
return false;
|
|
|
274 |
} else if (!addedOn.equals(other.addedOn))
|
|
|
275 |
return false;
|
|
|
276 |
if (billingType == null) {
|
|
|
277 |
if (other.billingType != null)
|
|
|
278 |
return false;
|
|
|
279 |
} else if (!billingType.equals(other.billingType))
|
|
|
280 |
return false;
|
|
|
281 |
if (billingWarehouseId != other.billingWarehouseId)
|
|
|
282 |
return false;
|
|
|
283 |
if (displayName == null) {
|
|
|
284 |
if (other.displayName != null)
|
|
|
285 |
return false;
|
|
|
286 |
} else if (!displayName.equals(other.displayName))
|
|
|
287 |
return false;
|
|
|
288 |
if (gstin == null) {
|
|
|
289 |
if (other.gstin != null)
|
|
|
290 |
return false;
|
|
|
291 |
} else if (!gstin.equals(other.gstin))
|
|
|
292 |
return false;
|
|
|
293 |
if (id != other.id)
|
|
|
294 |
return false;
|
|
|
295 |
if (inventoryType != other.inventoryType)
|
|
|
296 |
return false;
|
|
|
297 |
if (isAvailabilityMonitored != other.isAvailabilityMonitored)
|
|
|
298 |
return false;
|
|
|
299 |
if (lastCheckedOn == null) {
|
|
|
300 |
if (other.lastCheckedOn != null)
|
|
|
301 |
return false;
|
|
|
302 |
} else if (!lastCheckedOn.equals(other.lastCheckedOn))
|
|
|
303 |
return false;
|
|
|
304 |
if (location == null) {
|
|
|
305 |
if (other.location != null)
|
|
|
306 |
return false;
|
|
|
307 |
} else if (!location.equals(other.location))
|
|
|
308 |
return false;
|
|
|
309 |
if (logisticsLocation == null) {
|
|
|
310 |
if (other.logisticsLocation != null)
|
|
|
311 |
return false;
|
|
|
312 |
} else if (!logisticsLocation.equals(other.logisticsLocation))
|
|
|
313 |
return false;
|
|
|
314 |
if (pincode == null) {
|
|
|
315 |
if (other.pincode != null)
|
|
|
316 |
return false;
|
|
|
317 |
} else if (!pincode.equals(other.pincode))
|
|
|
318 |
return false;
|
|
|
319 |
if (shippingWarehouseId != other.shippingWarehouseId)
|
|
|
320 |
return false;
|
|
|
321 |
if (source == null) {
|
|
|
322 |
if (other.source != null)
|
|
|
323 |
return false;
|
|
|
324 |
} else if (!source.equals(other.source))
|
|
|
325 |
return false;
|
|
|
326 |
if (stateId != other.stateId)
|
|
|
327 |
return false;
|
|
|
328 |
if (status != other.status)
|
|
|
329 |
return false;
|
|
|
330 |
if (tinNumber == null) {
|
|
|
331 |
if (other.tinNumber != null)
|
|
|
332 |
return false;
|
|
|
333 |
} else if (!tinNumber.equals(other.tinNumber))
|
|
|
334 |
return false;
|
|
|
335 |
if (transferDelayInHours != other.transferDelayInHours)
|
|
|
336 |
return false;
|
|
|
337 |
if (vendor != other.vendor)
|
|
|
338 |
return false;
|
|
|
339 |
if (vendorString == null) {
|
|
|
340 |
if (other.vendorString != null)
|
|
|
341 |
return false;
|
|
|
342 |
} else if (!vendorString.equals(other.vendorString))
|
|
|
343 |
return false;
|
|
|
344 |
if (warehouseType != other.warehouseType)
|
|
|
345 |
return false;
|
|
|
346 |
return true;
|
|
|
347 |
}
|
|
|
348 |
|
| 28493 |
tejbeer |
349 |
public Warehouse() {
|
|
|
350 |
super();
|
|
|
351 |
// TODO Auto-generated constructor stub
|
|
|
352 |
}
|
|
|
353 |
|
|
|
354 |
}
|