| 29708 |
amit.gupta |
1 |
package com.spice.profitmandi.common.services.mandii;
|
|
|
2 |
|
|
|
3 |
import java.time.LocalDate;
|
|
|
4 |
|
|
|
5 |
public class Company {
|
|
|
6 |
|
|
|
7 |
private String name;
|
|
|
8 |
private String title;
|
|
|
9 |
//pattern: [A-Z]{3}[C,H,A,B,G,J,L,E,F,T,P]{1}[A-Z]{1}[0-9]{4}[A-Z]{1}
|
|
|
10 |
private String pan;
|
|
|
11 |
//"date_of_incorporation"
|
|
|
12 |
private LocalDate dateOfIncorportaion;
|
|
|
13 |
private String email;
|
|
|
14 |
private String phone;
|
|
|
15 |
private String gstin;
|
|
|
16 |
//registration_type
|
|
|
17 |
private CompanyRegistrationType registrationType;
|
|
|
18 |
private IndustryType industryType;
|
|
|
19 |
//business_vintage
|
|
|
20 |
private int businessVintage;
|
|
|
21 |
//last_12_months_turnover
|
|
|
22 |
private double last12MonthsTurnover;
|
|
|
23 |
@Override
|
|
|
24 |
public String toString() {
|
|
|
25 |
return "Company [name=" + name + ", title=" + title + ", pan=" + pan + ", dateOfIncorportaion="
|
|
|
26 |
+ dateOfIncorportaion + ", email=" + email + ", phone=" + phone + ", gstin=" + gstin
|
|
|
27 |
+ ", registrationType=" + registrationType + ", industryType=" + industryType + ", businessVintage="
|
|
|
28 |
+ businessVintage + ", last12MonthsTurnover=" + last12MonthsTurnover + "]";
|
|
|
29 |
}
|
|
|
30 |
public String getName() {
|
|
|
31 |
return name;
|
|
|
32 |
}
|
|
|
33 |
public void setName(String name) {
|
|
|
34 |
this.name = name;
|
|
|
35 |
}
|
|
|
36 |
public String getTitle() {
|
|
|
37 |
return title;
|
|
|
38 |
}
|
|
|
39 |
public void setTitle(String title) {
|
|
|
40 |
this.title = title;
|
|
|
41 |
}
|
|
|
42 |
public String getPan() {
|
|
|
43 |
return pan;
|
|
|
44 |
}
|
|
|
45 |
public void setPan(String pan) {
|
|
|
46 |
this.pan = pan;
|
|
|
47 |
}
|
|
|
48 |
public LocalDate getDateOfIncorportaion() {
|
|
|
49 |
return dateOfIncorportaion;
|
|
|
50 |
}
|
|
|
51 |
public void setDateOfIncorportaion(LocalDate dateOfIncorportaion) {
|
|
|
52 |
this.dateOfIncorportaion = dateOfIncorportaion;
|
|
|
53 |
}
|
|
|
54 |
public String getEmail() {
|
|
|
55 |
return email;
|
|
|
56 |
}
|
|
|
57 |
public void setEmail(String email) {
|
|
|
58 |
this.email = email;
|
|
|
59 |
}
|
|
|
60 |
public String getPhone() {
|
|
|
61 |
return phone;
|
|
|
62 |
}
|
|
|
63 |
public void setPhone(String phone) {
|
|
|
64 |
this.phone = phone;
|
|
|
65 |
}
|
|
|
66 |
public String getGstin() {
|
|
|
67 |
return gstin;
|
|
|
68 |
}
|
|
|
69 |
public void setGstin(String gstin) {
|
|
|
70 |
this.gstin = gstin;
|
|
|
71 |
}
|
|
|
72 |
public CompanyRegistrationType getRegistrationType() {
|
|
|
73 |
return registrationType;
|
|
|
74 |
}
|
|
|
75 |
public void setRegistrationType(CompanyRegistrationType registrationType) {
|
|
|
76 |
this.registrationType = registrationType;
|
|
|
77 |
}
|
|
|
78 |
public IndustryType getIndustryType() {
|
|
|
79 |
return industryType;
|
|
|
80 |
}
|
|
|
81 |
public void setIndustryType(IndustryType industryType) {
|
|
|
82 |
this.industryType = industryType;
|
|
|
83 |
}
|
|
|
84 |
public int getBusinessVintage() {
|
|
|
85 |
return businessVintage;
|
|
|
86 |
}
|
|
|
87 |
public void setBusinessVintage(int businessVintage) {
|
|
|
88 |
this.businessVintage = businessVintage;
|
|
|
89 |
}
|
|
|
90 |
public double getLast12MonthsTurnover() {
|
|
|
91 |
return last12MonthsTurnover;
|
|
|
92 |
}
|
|
|
93 |
public void setLast12MonthsTurnover(double last12MonthsTurnover) {
|
|
|
94 |
this.last12MonthsTurnover = last12MonthsTurnover;
|
|
|
95 |
}
|
|
|
96 |
@Override
|
|
|
97 |
public int hashCode() {
|
|
|
98 |
final int prime = 31;
|
|
|
99 |
int result = 1;
|
|
|
100 |
result = prime * result + businessVintage;
|
|
|
101 |
result = prime * result + ((dateOfIncorportaion == null) ? 0 : dateOfIncorportaion.hashCode());
|
|
|
102 |
result = prime * result + ((email == null) ? 0 : email.hashCode());
|
|
|
103 |
result = prime * result + ((gstin == null) ? 0 : gstin.hashCode());
|
|
|
104 |
result = prime * result + ((industryType == null) ? 0 : industryType.hashCode());
|
|
|
105 |
long temp;
|
|
|
106 |
temp = Double.doubleToLongBits(last12MonthsTurnover);
|
|
|
107 |
result = prime * result + (int) (temp ^ (temp >>> 32));
|
|
|
108 |
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
|
|
109 |
result = prime * result + ((pan == null) ? 0 : pan.hashCode());
|
|
|
110 |
result = prime * result + ((phone == null) ? 0 : phone.hashCode());
|
|
|
111 |
result = prime * result + ((registrationType == null) ? 0 : registrationType.hashCode());
|
|
|
112 |
result = prime * result + ((title == null) ? 0 : title.hashCode());
|
|
|
113 |
return result;
|
|
|
114 |
}
|
|
|
115 |
@Override
|
|
|
116 |
public boolean equals(Object obj) {
|
|
|
117 |
if (this == obj)
|
|
|
118 |
return true;
|
|
|
119 |
if (obj == null)
|
|
|
120 |
return false;
|
|
|
121 |
if (getClass() != obj.getClass())
|
|
|
122 |
return false;
|
|
|
123 |
Company other = (Company) obj;
|
|
|
124 |
if (businessVintage != other.businessVintage)
|
|
|
125 |
return false;
|
|
|
126 |
if (dateOfIncorportaion == null) {
|
|
|
127 |
if (other.dateOfIncorportaion != null)
|
|
|
128 |
return false;
|
|
|
129 |
} else if (!dateOfIncorportaion.equals(other.dateOfIncorportaion))
|
|
|
130 |
return false;
|
|
|
131 |
if (email == null) {
|
|
|
132 |
if (other.email != null)
|
|
|
133 |
return false;
|
|
|
134 |
} else if (!email.equals(other.email))
|
|
|
135 |
return false;
|
|
|
136 |
if (gstin == null) {
|
|
|
137 |
if (other.gstin != null)
|
|
|
138 |
return false;
|
|
|
139 |
} else if (!gstin.equals(other.gstin))
|
|
|
140 |
return false;
|
|
|
141 |
if (industryType != other.industryType)
|
|
|
142 |
return false;
|
|
|
143 |
if (Double.doubleToLongBits(last12MonthsTurnover) != Double.doubleToLongBits(other.last12MonthsTurnover))
|
|
|
144 |
return false;
|
|
|
145 |
if (name == null) {
|
|
|
146 |
if (other.name != null)
|
|
|
147 |
return false;
|
|
|
148 |
} else if (!name.equals(other.name))
|
|
|
149 |
return false;
|
|
|
150 |
if (pan == null) {
|
|
|
151 |
if (other.pan != null)
|
|
|
152 |
return false;
|
|
|
153 |
} else if (!pan.equals(other.pan))
|
|
|
154 |
return false;
|
|
|
155 |
if (phone == null) {
|
|
|
156 |
if (other.phone != null)
|
|
|
157 |
return false;
|
|
|
158 |
} else if (!phone.equals(other.phone))
|
|
|
159 |
return false;
|
|
|
160 |
if (registrationType != other.registrationType)
|
|
|
161 |
return false;
|
|
|
162 |
if (title == null) {
|
|
|
163 |
if (other.title != null)
|
|
|
164 |
return false;
|
|
|
165 |
} else if (!title.equals(other.title))
|
|
|
166 |
return false;
|
|
|
167 |
return true;
|
|
|
168 |
}
|
|
|
169 |
|
|
|
170 |
|
|
|
171 |
|
|
|
172 |
|
|
|
173 |
}
|