| 28299 |
tejbeer |
1 |
package com.spice.profitmandi.dao.entity.warehouse;
|
|
|
2 |
|
|
|
3 |
import java.time.LocalDateTime;
|
|
|
4 |
|
|
|
5 |
import javax.persistence.Column;
|
|
|
6 |
import javax.persistence.Entity;
|
|
|
7 |
import javax.persistence.GeneratedValue;
|
|
|
8 |
import javax.persistence.GenerationType;
|
|
|
9 |
import javax.persistence.Id;
|
|
|
10 |
import javax.persistence.Table;
|
|
|
11 |
|
|
|
12 |
@Entity
|
|
|
13 |
@Table(name = "warehouse.supplier", schema = "warehouse")
|
|
|
14 |
public class Supplier {
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
@Id
|
|
|
18 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
19 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
20 |
private int id; // required
|
|
|
21 |
private String name; // required
|
|
|
22 |
private String phone; // required
|
|
|
23 |
private String fax; // required
|
|
|
24 |
private String tin; // required
|
|
|
25 |
private String pan; // required
|
|
|
26 |
private String headName; // required
|
|
|
27 |
private String headDesignation; // required
|
|
|
28 |
private String headEmail; // required
|
|
|
29 |
private String contactName; // required
|
|
|
30 |
private String contactPhone; // required
|
|
|
31 |
private String contactFax; // required
|
|
|
32 |
private String contactEmail; // required
|
|
|
33 |
private String registeredAddress; // required
|
|
|
34 |
private String communicationAddress; // required
|
|
|
35 |
private int stateId; // required
|
|
|
36 |
private int poValidityLimit; // required
|
|
|
37 |
private String gstin; // required
|
|
|
38 |
private String tnc;
|
|
|
39 |
@Column(name = "status")
|
|
|
40 |
private boolean status;
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
public boolean isStatus() {
|
|
|
44 |
return status;
|
|
|
45 |
}
|
|
|
46 |
public void setStatus(boolean status) {
|
|
|
47 |
this.status = status;
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
public int getId() {
|
|
|
51 |
return id;
|
|
|
52 |
}
|
|
|
53 |
public void setId(int id) {
|
|
|
54 |
this.id = id;
|
|
|
55 |
}
|
|
|
56 |
public String getName() {
|
|
|
57 |
return name;
|
|
|
58 |
}
|
|
|
59 |
public void setName(String name) {
|
|
|
60 |
this.name = name;
|
|
|
61 |
}
|
|
|
62 |
public String getPhone() {
|
|
|
63 |
return phone;
|
|
|
64 |
}
|
|
|
65 |
public void setPhone(String phone) {
|
|
|
66 |
this.phone = phone;
|
|
|
67 |
}
|
|
|
68 |
public String getFax() {
|
|
|
69 |
return fax;
|
|
|
70 |
}
|
|
|
71 |
public void setFax(String fax) {
|
|
|
72 |
this.fax = fax;
|
|
|
73 |
}
|
|
|
74 |
public String getTin() {
|
|
|
75 |
return tin;
|
|
|
76 |
}
|
|
|
77 |
public void setTin(String tin) {
|
|
|
78 |
this.tin = tin;
|
|
|
79 |
}
|
|
|
80 |
public String getPan() {
|
|
|
81 |
return pan;
|
|
|
82 |
}
|
|
|
83 |
public void setPan(String pan) {
|
|
|
84 |
this.pan = pan;
|
|
|
85 |
}
|
|
|
86 |
public String getHeadName() {
|
|
|
87 |
return headName;
|
|
|
88 |
}
|
|
|
89 |
public void setHeadName(String headName) {
|
|
|
90 |
this.headName = headName;
|
|
|
91 |
}
|
|
|
92 |
public String getHeadDesignation() {
|
|
|
93 |
return headDesignation;
|
|
|
94 |
}
|
|
|
95 |
public void setHeadDesignation(String headDesignation) {
|
|
|
96 |
this.headDesignation = headDesignation;
|
|
|
97 |
}
|
|
|
98 |
public String getHeadEmail() {
|
|
|
99 |
return headEmail;
|
|
|
100 |
}
|
|
|
101 |
public void setHeadEmail(String headEmail) {
|
|
|
102 |
this.headEmail = headEmail;
|
|
|
103 |
}
|
|
|
104 |
public String getContactName() {
|
|
|
105 |
return contactName;
|
|
|
106 |
}
|
|
|
107 |
public void setContactName(String contactName) {
|
|
|
108 |
this.contactName = contactName;
|
|
|
109 |
}
|
|
|
110 |
public String getContactPhone() {
|
|
|
111 |
return contactPhone;
|
|
|
112 |
}
|
|
|
113 |
public void setContactPhone(String contactPhone) {
|
|
|
114 |
this.contactPhone = contactPhone;
|
|
|
115 |
}
|
|
|
116 |
public String getContactFax() {
|
|
|
117 |
return contactFax;
|
|
|
118 |
}
|
|
|
119 |
public void setContactFax(String contactFax) {
|
|
|
120 |
this.contactFax = contactFax;
|
|
|
121 |
}
|
|
|
122 |
public String getContactEmail() {
|
|
|
123 |
return contactEmail;
|
|
|
124 |
}
|
|
|
125 |
public void setContactEmail(String contactEmail) {
|
|
|
126 |
this.contactEmail = contactEmail;
|
|
|
127 |
}
|
|
|
128 |
public String getRegisteredAddress() {
|
|
|
129 |
return registeredAddress;
|
|
|
130 |
}
|
|
|
131 |
public void setRegisteredAddress(String registeredAddress) {
|
|
|
132 |
this.registeredAddress = registeredAddress;
|
|
|
133 |
}
|
|
|
134 |
public String getCommunicationAddress() {
|
|
|
135 |
return communicationAddress;
|
|
|
136 |
}
|
|
|
137 |
public void setCommunicationAddress(String communicationAddress) {
|
|
|
138 |
this.communicationAddress = communicationAddress;
|
|
|
139 |
}
|
|
|
140 |
public int getStateId() {
|
|
|
141 |
return stateId;
|
|
|
142 |
}
|
|
|
143 |
public void setStateId(int stateId) {
|
|
|
144 |
this.stateId = stateId;
|
|
|
145 |
}
|
|
|
146 |
public int getPoValidityLimit() {
|
|
|
147 |
return poValidityLimit;
|
|
|
148 |
}
|
|
|
149 |
public void setPoValidityLimit(int poValidityLimit) {
|
|
|
150 |
this.poValidityLimit = poValidityLimit;
|
|
|
151 |
}
|
|
|
152 |
public String getGstin() {
|
|
|
153 |
return gstin;
|
|
|
154 |
}
|
|
|
155 |
public void setGstin(String gstin) {
|
|
|
156 |
this.gstin = gstin;
|
|
|
157 |
}
|
|
|
158 |
public String getTnc() {
|
|
|
159 |
return tnc;
|
|
|
160 |
}
|
|
|
161 |
public void setTnc(String tnc) {
|
|
|
162 |
this.tnc = tnc;
|
|
|
163 |
}
|
|
|
164 |
public Supplier() {
|
|
|
165 |
super();
|
|
|
166 |
// TODO Auto-generated constructor stub
|
|
|
167 |
}
|
|
|
168 |
@Override
|
|
|
169 |
public String toString() {
|
|
|
170 |
return "Supplier [id=" + id + ", name=" + name + ", phone=" + phone + ", fax=" + fax + ", tin=" + tin + ", pan="
|
|
|
171 |
+ pan + ", headName=" + headName + ", headDesignation=" + headDesignation + ", headEmail=" + headEmail
|
|
|
172 |
+ ", contactName=" + contactName + ", contactPhone=" + contactPhone + ", contactFax=" + contactFax
|
|
|
173 |
+ ", contactEmail=" + contactEmail + ", registeredAddress=" + registeredAddress
|
|
|
174 |
+ ", communicationAddress=" + communicationAddress + ", stateId=" + stateId + ", poValidityLimit="
|
|
|
175 |
+ poValidityLimit + ", gstin=" + gstin + ", tnc=" + tnc + "]";
|
|
|
176 |
}
|
|
|
177 |
@Override
|
|
|
178 |
public int hashCode() {
|
|
|
179 |
final int prime = 31;
|
|
|
180 |
int result = 1;
|
|
|
181 |
result = prime * result + ((communicationAddress == null) ? 0 : communicationAddress.hashCode());
|
|
|
182 |
result = prime * result + ((contactEmail == null) ? 0 : contactEmail.hashCode());
|
|
|
183 |
result = prime * result + ((contactFax == null) ? 0 : contactFax.hashCode());
|
|
|
184 |
result = prime * result + ((contactName == null) ? 0 : contactName.hashCode());
|
|
|
185 |
result = prime * result + ((contactPhone == null) ? 0 : contactPhone.hashCode());
|
|
|
186 |
result = prime * result + ((fax == null) ? 0 : fax.hashCode());
|
|
|
187 |
result = prime * result + ((gstin == null) ? 0 : gstin.hashCode());
|
|
|
188 |
result = prime * result + ((headDesignation == null) ? 0 : headDesignation.hashCode());
|
|
|
189 |
result = prime * result + ((headEmail == null) ? 0 : headEmail.hashCode());
|
|
|
190 |
result = prime * result + ((headName == null) ? 0 : headName.hashCode());
|
|
|
191 |
result = prime * result + id;
|
|
|
192 |
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
|
|
193 |
result = prime * result + ((pan == null) ? 0 : pan.hashCode());
|
|
|
194 |
result = prime * result + ((phone == null) ? 0 : phone.hashCode());
|
|
|
195 |
result = prime * result + poValidityLimit;
|
|
|
196 |
result = prime * result + ((registeredAddress == null) ? 0 : registeredAddress.hashCode());
|
|
|
197 |
result = prime * result + stateId;
|
|
|
198 |
result = prime * result + ((tin == null) ? 0 : tin.hashCode());
|
|
|
199 |
result = prime * result + ((tnc == null) ? 0 : tnc.hashCode());
|
|
|
200 |
return result;
|
|
|
201 |
}
|
|
|
202 |
@Override
|
|
|
203 |
public boolean equals(Object obj) {
|
|
|
204 |
if (this == obj)
|
|
|
205 |
return true;
|
|
|
206 |
if (obj == null)
|
|
|
207 |
return false;
|
|
|
208 |
if (getClass() != obj.getClass())
|
|
|
209 |
return false;
|
|
|
210 |
Supplier other = (Supplier) obj;
|
|
|
211 |
if (communicationAddress == null) {
|
|
|
212 |
if (other.communicationAddress != null)
|
|
|
213 |
return false;
|
|
|
214 |
} else if (!communicationAddress.equals(other.communicationAddress))
|
|
|
215 |
return false;
|
|
|
216 |
if (contactEmail == null) {
|
|
|
217 |
if (other.contactEmail != null)
|
|
|
218 |
return false;
|
|
|
219 |
} else if (!contactEmail.equals(other.contactEmail))
|
|
|
220 |
return false;
|
|
|
221 |
if (contactFax == null) {
|
|
|
222 |
if (other.contactFax != null)
|
|
|
223 |
return false;
|
|
|
224 |
} else if (!contactFax.equals(other.contactFax))
|
|
|
225 |
return false;
|
|
|
226 |
if (contactName == null) {
|
|
|
227 |
if (other.contactName != null)
|
|
|
228 |
return false;
|
|
|
229 |
} else if (!contactName.equals(other.contactName))
|
|
|
230 |
return false;
|
|
|
231 |
if (contactPhone == null) {
|
|
|
232 |
if (other.contactPhone != null)
|
|
|
233 |
return false;
|
|
|
234 |
} else if (!contactPhone.equals(other.contactPhone))
|
|
|
235 |
return false;
|
|
|
236 |
if (fax == null) {
|
|
|
237 |
if (other.fax != null)
|
|
|
238 |
return false;
|
|
|
239 |
} else if (!fax.equals(other.fax))
|
|
|
240 |
return false;
|
|
|
241 |
if (gstin == null) {
|
|
|
242 |
if (other.gstin != null)
|
|
|
243 |
return false;
|
|
|
244 |
} else if (!gstin.equals(other.gstin))
|
|
|
245 |
return false;
|
|
|
246 |
if (headDesignation == null) {
|
|
|
247 |
if (other.headDesignation != null)
|
|
|
248 |
return false;
|
|
|
249 |
} else if (!headDesignation.equals(other.headDesignation))
|
|
|
250 |
return false;
|
|
|
251 |
if (headEmail == null) {
|
|
|
252 |
if (other.headEmail != null)
|
|
|
253 |
return false;
|
|
|
254 |
} else if (!headEmail.equals(other.headEmail))
|
|
|
255 |
return false;
|
|
|
256 |
if (headName == null) {
|
|
|
257 |
if (other.headName != null)
|
|
|
258 |
return false;
|
|
|
259 |
} else if (!headName.equals(other.headName))
|
|
|
260 |
return false;
|
|
|
261 |
if (id != other.id)
|
|
|
262 |
return false;
|
|
|
263 |
if (name == null) {
|
|
|
264 |
if (other.name != null)
|
|
|
265 |
return false;
|
|
|
266 |
} else if (!name.equals(other.name))
|
|
|
267 |
return false;
|
|
|
268 |
if (pan == null) {
|
|
|
269 |
if (other.pan != null)
|
|
|
270 |
return false;
|
|
|
271 |
} else if (!pan.equals(other.pan))
|
|
|
272 |
return false;
|
|
|
273 |
if (phone == null) {
|
|
|
274 |
if (other.phone != null)
|
|
|
275 |
return false;
|
|
|
276 |
} else if (!phone.equals(other.phone))
|
|
|
277 |
return false;
|
|
|
278 |
if (poValidityLimit != other.poValidityLimit)
|
|
|
279 |
return false;
|
|
|
280 |
if (registeredAddress == null) {
|
|
|
281 |
if (other.registeredAddress != null)
|
|
|
282 |
return false;
|
|
|
283 |
} else if (!registeredAddress.equals(other.registeredAddress))
|
|
|
284 |
return false;
|
|
|
285 |
if (stateId != other.stateId)
|
|
|
286 |
return false;
|
|
|
287 |
if (tin == null) {
|
|
|
288 |
if (other.tin != null)
|
|
|
289 |
return false;
|
|
|
290 |
} else if (!tin.equals(other.tin))
|
|
|
291 |
return false;
|
|
|
292 |
if (tnc == null) {
|
|
|
293 |
if (other.tnc != null)
|
|
|
294 |
return false;
|
|
|
295 |
} else if (!tnc.equals(other.tnc))
|
|
|
296 |
return false;
|
|
|
297 |
return true;
|
|
|
298 |
}
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
|
|
|
302 |
|
|
|
303 |
|
|
|
304 |
|
|
|
305 |
|
|
|
306 |
|
|
|
307 |
}
|