| Line 4... |
Line 4... |
| 4 |
import javax.persistence.Entity;
|
4 |
import javax.persistence.Entity;
|
| 5 |
import javax.persistence.GeneratedValue;
|
5 |
import javax.persistence.GeneratedValue;
|
| 6 |
import javax.persistence.GenerationType;
|
6 |
import javax.persistence.GenerationType;
|
| 7 |
import javax.persistence.Id;
|
7 |
import javax.persistence.Id;
|
| 8 |
import javax.persistence.Table;
|
8 |
import javax.persistence.Table;
|
| - |
|
9 |
import java.util.Objects;
|
| 9 |
|
10 |
|
| 10 |
@Entity
|
11 |
@Entity
|
| 11 |
@Table(name = "warehouse.supplier")
|
12 |
@Table(name = "warehouse.supplier")
|
| 12 |
public class Supplier {
|
13 |
public class Supplier {
|
| 13 |
|
14 |
|
| Line 30... |
Line 31... |
| 30 |
private String contactFax; // required
|
31 |
private String contactFax; // required
|
| 31 |
private String contactEmail; // required
|
32 |
private String contactEmail; // required
|
| 32 |
private String registeredAddress; // required
|
33 |
private String registeredAddress; // required
|
| 33 |
private String communicationAddress; // required
|
34 |
private String communicationAddress; // required
|
| 34 |
private int stateId; // required
|
35 |
private int stateId; // required
|
| 35 |
private int poValidityLimit; // required
|
36 |
private int poValidityLimit; // requiredx
|
| 36 |
private String gstin; // required
|
37 |
private String gstin; // required
|
| 37 |
private String tnc;
|
38 |
private String tnc;
|
| 38 |
@Column(name = "status")
|
39 |
@Column(name = "status")
|
| 39 |
private boolean status;
|
40 |
private boolean status;
|
| - |
|
41 |
private boolean internal;
|
| - |
|
42 |
|
| - |
|
43 |
public boolean isInternal() {
|
| - |
|
44 |
return internal;
|
| - |
|
45 |
}
|
| - |
|
46 |
|
| - |
|
47 |
@Override
|
| - |
|
48 |
public boolean equals(Object o) {
|
| - |
|
49 |
if (this == o) return true;
|
| - |
|
50 |
if (o == null || getClass() != o.getClass()) return false;
|
| - |
|
51 |
Supplier supplier = (Supplier) o;
|
| - |
|
52 |
return id == supplier.id && stateId == supplier.stateId && poValidityLimit == supplier.poValidityLimit && status == supplier.status && internal == supplier.internal && Objects.equals(name, supplier.name) && Objects.equals(phone, supplier.phone) && Objects.equals(fax, supplier.fax) && Objects.equals(tin, supplier.tin) && Objects.equals(pan, supplier.pan) && Objects.equals(headName, supplier.headName) && Objects.equals(headDesignation, supplier.headDesignation) && Objects.equals(headEmail, supplier.headEmail) && Objects.equals(contactName, supplier.contactName) && Objects.equals(contactPhone, supplier.contactPhone) && Objects.equals(contactFax, supplier.contactFax) && Objects.equals(contactEmail, supplier.contactEmail) && Objects.equals(registeredAddress, supplier.registeredAddress) && Objects.equals(communicationAddress, supplier.communicationAddress) && Objects.equals(gstin, supplier.gstin) && Objects.equals(tnc, supplier.tnc);
|
| - |
|
53 |
}
|
| - |
|
54 |
|
| - |
|
55 |
@Override
|
| - |
|
56 |
public int hashCode() {
|
| - |
|
57 |
return Objects.hash(id, name, phone, fax, tin, pan, headName, headDesignation, headEmail, contactName, contactPhone, contactFax, contactEmail, registeredAddress, communicationAddress, stateId, poValidityLimit, gstin, tnc, status, internal);
|
| - |
|
58 |
}
|
| - |
|
59 |
|
| - |
|
60 |
public void setInternal(boolean internal) {
|
| - |
|
61 |
this.internal = internal;
|
| - |
|
62 |
}
|
| 40 |
|
63 |
|
| 41 |
public boolean isStatus() {
|
64 |
public boolean isStatus() {
|
| 42 |
return status;
|
65 |
return status;
|
| 43 |
}
|
66 |
}
|
| 44 |
|
67 |
|
| Line 206... |
Line 229... |
| 206 |
@Override
|
229 |
@Override
|
| 207 |
public String toString() {
|
230 |
public String toString() {
|
| 208 |
return "Supplier [id=" + id + ", name=" + name + ", phone=" + phone + ", fax=" + fax + ", tin=" + tin + ", pan=" + pan + ", headName=" + headName + ", headDesignation=" + headDesignation + ", headEmail=" + headEmail + ", contactName=" + contactName + ", contactPhone=" + contactPhone + ", contactFax=" + contactFax + ", contactEmail=" + contactEmail + ", registeredAddress=" + registeredAddress + ", communicationAddress=" + communicationAddress + ", stateId=" + stateId + ", poValidityLimit=" + poValidityLimit + ", gstin=" + gstin + ", tnc=" + tnc + "]";
|
231 |
return "Supplier [id=" + id + ", name=" + name + ", phone=" + phone + ", fax=" + fax + ", tin=" + tin + ", pan=" + pan + ", headName=" + headName + ", headDesignation=" + headDesignation + ", headEmail=" + headEmail + ", contactName=" + contactName + ", contactPhone=" + contactPhone + ", contactFax=" + contactFax + ", contactEmail=" + contactEmail + ", registeredAddress=" + registeredAddress + ", communicationAddress=" + communicationAddress + ", stateId=" + stateId + ", poValidityLimit=" + poValidityLimit + ", gstin=" + gstin + ", tnc=" + tnc + "]";
|
| 209 |
}
|
232 |
}
|
| 210 |
|
233 |
|
| 211 |
@Override
|
- |
|
| 212 |
public int hashCode() {
|
- |
|
| 213 |
final int prime = 31;
|
- |
|
| 214 |
int result = 1;
|
- |
|
| 215 |
result = prime * result + ((communicationAddress == null) ? 0 : communicationAddress.hashCode());
|
- |
|
| 216 |
result = prime * result + ((contactEmail == null) ? 0 : contactEmail.hashCode());
|
- |
|
| 217 |
result = prime * result + ((contactFax == null) ? 0 : contactFax.hashCode());
|
- |
|
| 218 |
result = prime * result + ((contactName == null) ? 0 : contactName.hashCode());
|
- |
|
| 219 |
result = prime * result + ((contactPhone == null) ? 0 : contactPhone.hashCode());
|
- |
|
| 220 |
result = prime * result + ((fax == null) ? 0 : fax.hashCode());
|
- |
|
| 221 |
result = prime * result + ((gstin == null) ? 0 : gstin.hashCode());
|
- |
|
| 222 |
result = prime * result + ((headDesignation == null) ? 0 : headDesignation.hashCode());
|
- |
|
| 223 |
result = prime * result + ((headEmail == null) ? 0 : headEmail.hashCode());
|
- |
|
| 224 |
result = prime * result + ((headName == null) ? 0 : headName.hashCode());
|
- |
|
| 225 |
result = prime * result + id;
|
- |
|
| 226 |
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
- |
|
| 227 |
result = prime * result + ((pan == null) ? 0 : pan.hashCode());
|
- |
|
| 228 |
result = prime * result + ((phone == null) ? 0 : phone.hashCode());
|
- |
|
| 229 |
result = prime * result + poValidityLimit;
|
- |
|
| 230 |
result = prime * result + ((registeredAddress == null) ? 0 : registeredAddress.hashCode());
|
- |
|
| 231 |
result = prime * result + stateId;
|
- |
|
| 232 |
result = prime * result + ((tin == null) ? 0 : tin.hashCode());
|
- |
|
| 233 |
result = prime * result + ((tnc == null) ? 0 : tnc.hashCode());
|
- |
|
| 234 |
return result;
|
- |
|
| 235 |
}
|
- |
|
| 236 |
|
- |
|
| 237 |
@Override
|
- |
|
| 238 |
public boolean equals(Object obj) {
|
- |
|
| 239 |
if (this == obj)
|
- |
|
| 240 |
return true;
|
- |
|
| 241 |
if (obj == null)
|
- |
|
| 242 |
return false;
|
- |
|
| 243 |
if (getClass() != obj.getClass())
|
- |
|
| 244 |
return false;
|
- |
|
| 245 |
Supplier other = (Supplier) obj;
|
- |
|
| 246 |
if (communicationAddress == null) {
|
- |
|
| 247 |
if (other.communicationAddress != null)
|
- |
|
| 248 |
return false;
|
- |
|
| 249 |
} else if (!communicationAddress.equals(other.communicationAddress))
|
- |
|
| 250 |
return false;
|
- |
|
| 251 |
if (contactEmail == null) {
|
- |
|
| 252 |
if (other.contactEmail != null)
|
- |
|
| 253 |
return false;
|
- |
|
| 254 |
} else if (!contactEmail.equals(other.contactEmail))
|
- |
|
| 255 |
return false;
|
- |
|
| 256 |
if (contactFax == null) {
|
- |
|
| 257 |
if (other.contactFax != null)
|
- |
|
| 258 |
return false;
|
- |
|
| 259 |
} else if (!contactFax.equals(other.contactFax))
|
- |
|
| 260 |
return false;
|
- |
|
| 261 |
if (contactName == null) {
|
- |
|
| 262 |
if (other.contactName != null)
|
- |
|
| 263 |
return false;
|
- |
|
| 264 |
} else if (!contactName.equals(other.contactName))
|
- |
|
| 265 |
return false;
|
- |
|
| 266 |
if (contactPhone == null) {
|
- |
|
| 267 |
if (other.contactPhone != null)
|
- |
|
| 268 |
return false;
|
- |
|
| 269 |
} else if (!contactPhone.equals(other.contactPhone))
|
- |
|
| 270 |
return false;
|
- |
|
| 271 |
if (fax == null) {
|
- |
|
| 272 |
if (other.fax != null)
|
- |
|
| 273 |
return false;
|
- |
|
| 274 |
} else if (!fax.equals(other.fax))
|
- |
|
| 275 |
return false;
|
- |
|
| 276 |
if (gstin == null) {
|
- |
|
| 277 |
if (other.gstin != null)
|
- |
|
| 278 |
return false;
|
- |
|
| 279 |
} else if (!gstin.equals(other.gstin))
|
- |
|
| 280 |
return false;
|
- |
|
| 281 |
if (headDesignation == null) {
|
- |
|
| 282 |
if (other.headDesignation != null)
|
- |
|
| 283 |
return false;
|
- |
|
| 284 |
} else if (!headDesignation.equals(other.headDesignation))
|
- |
|
| 285 |
return false;
|
- |
|
| 286 |
if (headEmail == null) {
|
- |
|
| 287 |
if (other.headEmail != null)
|
- |
|
| 288 |
return false;
|
- |
|
| 289 |
} else if (!headEmail.equals(other.headEmail))
|
- |
|
| 290 |
return false;
|
- |
|
| 291 |
if (headName == null) {
|
- |
|
| 292 |
if (other.headName != null)
|
- |
|
| 293 |
return false;
|
- |
|
| 294 |
} else if (!headName.equals(other.headName))
|
- |
|
| 295 |
return false;
|
- |
|
| 296 |
if (id != other.id)
|
- |
|
| 297 |
return false;
|
- |
|
| 298 |
if (name == null) {
|
- |
|
| 299 |
if (other.name != null)
|
- |
|
| 300 |
return false;
|
- |
|
| 301 |
} else if (!name.equals(other.name))
|
- |
|
| 302 |
return false;
|
- |
|
| 303 |
if (pan == null) {
|
- |
|
| 304 |
if (other.pan != null)
|
- |
|
| 305 |
return false;
|
- |
|
| 306 |
} else if (!pan.equals(other.pan))
|
- |
|
| 307 |
return false;
|
- |
|
| 308 |
if (phone == null) {
|
- |
|
| 309 |
if (other.phone != null)
|
- |
|
| 310 |
return false;
|
- |
|
| 311 |
} else if (!phone.equals(other.phone))
|
- |
|
| 312 |
return false;
|
- |
|
| 313 |
if (poValidityLimit != other.poValidityLimit)
|
- |
|
| 314 |
return false;
|
- |
|
| 315 |
if (registeredAddress == null) {
|
- |
|
| 316 |
if (other.registeredAddress != null)
|
- |
|
| 317 |
return false;
|
- |
|
| 318 |
} else if (!registeredAddress.equals(other.registeredAddress))
|
- |
|
| 319 |
return false;
|
- |
|
| 320 |
if (stateId != other.stateId)
|
- |
|
| 321 |
return false;
|
- |
|
| 322 |
if (tin == null) {
|
- |
|
| 323 |
if (other.tin != null)
|
- |
|
| 324 |
return false;
|
- |
|
| 325 |
} else if (!tin.equals(other.tin))
|
- |
|
| 326 |
return false;
|
- |
|
| 327 |
if (tnc == null) {
|
- |
|
| 328 |
if (other.tnc != null)
|
- |
|
| 329 |
return false;
|
- |
|
| 330 |
} else if (!tnc.equals(other.tnc))
|
- |
|
| 331 |
return false;
|
- |
|
| 332 |
return true;
|
- |
|
| 333 |
}
|
- |
|
| 334 |
|
- |
|
| 335 |
}
|
234 |
}
|