| 21714 |
ashik.ali |
1 |
package com.spice.profitmandi.dao.entity.fofo;
|
| 21710 |
ashik.ali |
2 |
|
|
|
3 |
import java.io.Serializable;
|
|
|
4 |
import java.time.LocalDateTime;
|
|
|
5 |
|
|
|
6 |
import javax.persistence.Column;
|
|
|
7 |
import javax.persistence.Entity;
|
|
|
8 |
import javax.persistence.GeneratedValue;
|
|
|
9 |
import javax.persistence.GenerationType;
|
|
|
10 |
import javax.persistence.Id;
|
|
|
11 |
import javax.persistence.Table;
|
|
|
12 |
|
|
|
13 |
/**
|
|
|
14 |
* This class basically contains address details
|
|
|
15 |
*
|
|
|
16 |
* @author ashikali
|
|
|
17 |
*
|
|
|
18 |
*/
|
|
|
19 |
@Entity
|
| 21895 |
ashik.ali |
20 |
@Table(name="fofo.customer_address", schema = "fofo")
|
| 21710 |
ashik.ali |
21 |
public class CustomerAddress implements Serializable{
|
|
|
22 |
|
|
|
23 |
private static final long serialVersionUID = 1L;
|
|
|
24 |
|
|
|
25 |
public CustomerAddress() {
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
@Id
|
|
|
29 |
@Column(name="id", unique=true, updatable=false)
|
|
|
30 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
31 |
private int id;
|
|
|
32 |
|
|
|
33 |
@Column(name="name")
|
|
|
34 |
private String name;
|
|
|
35 |
|
|
|
36 |
@Column(name = "line_1")
|
|
|
37 |
private String line1;
|
|
|
38 |
|
|
|
39 |
@Column(name = "line_2")
|
|
|
40 |
private String line2;
|
|
|
41 |
|
|
|
42 |
@Column(name = "landmark")
|
|
|
43 |
private String landmark;
|
|
|
44 |
|
|
|
45 |
@Column(name = "city")
|
|
|
46 |
private String city;
|
|
|
47 |
|
|
|
48 |
@Column(name = "state")
|
|
|
49 |
private String state;
|
|
|
50 |
|
| 21895 |
ashik.ali |
51 |
@Column(name = "pin_code", length = 10)
|
| 21710 |
ashik.ali |
52 |
private String pinCode;
|
|
|
53 |
|
|
|
54 |
@Column(name = "country", length = 100)
|
|
|
55 |
private String country;
|
|
|
56 |
|
| 21895 |
ashik.ali |
57 |
@Column(name = "phone_number", length = 20)
|
| 21710 |
ashik.ali |
58 |
private String phoneNumber;
|
|
|
59 |
|
|
|
60 |
@Column(name = "customer_id")
|
|
|
61 |
private int customerId;
|
|
|
62 |
|
|
|
63 |
@Column(name="create_timestamp", updatable = false)
|
|
|
64 |
private LocalDateTime createTimestamp = LocalDateTime.now();
|
|
|
65 |
|
|
|
66 |
@Column(name="update_timestamp")
|
|
|
67 |
private LocalDateTime updateTimestamp = LocalDateTime.now();
|
|
|
68 |
|
|
|
69 |
public int getId() {
|
|
|
70 |
return id;
|
|
|
71 |
}
|
|
|
72 |
public void setId(int id) {
|
|
|
73 |
this.id = id;
|
|
|
74 |
}
|
|
|
75 |
public void setName(String name) {
|
|
|
76 |
this.name = name;
|
|
|
77 |
}
|
|
|
78 |
public String getName() {
|
|
|
79 |
return name;
|
|
|
80 |
}
|
|
|
81 |
public void setLine1(String line1) {
|
|
|
82 |
this.line1 = line1;
|
|
|
83 |
}
|
|
|
84 |
public String getLine1() {
|
|
|
85 |
return line1;
|
|
|
86 |
}
|
|
|
87 |
public void setLine2(String line2) {
|
|
|
88 |
this.line2 = line2;
|
|
|
89 |
}
|
|
|
90 |
public String getLine2() {
|
|
|
91 |
return line2;
|
|
|
92 |
}
|
|
|
93 |
public void setLandmark(String landmark) {
|
|
|
94 |
this.landmark = landmark;
|
|
|
95 |
}
|
|
|
96 |
public String getLandmark() {
|
|
|
97 |
return landmark;
|
|
|
98 |
}
|
|
|
99 |
public void setCity(String city) {
|
|
|
100 |
this.city = city;
|
|
|
101 |
}
|
|
|
102 |
public String getCity() {
|
|
|
103 |
return city;
|
|
|
104 |
}
|
|
|
105 |
public void setPinCode(String pinCode) {
|
|
|
106 |
this.pinCode = pinCode;
|
|
|
107 |
}
|
|
|
108 |
public String getPinCode() {
|
|
|
109 |
return pinCode;
|
|
|
110 |
}
|
|
|
111 |
public void setState(String state) {
|
|
|
112 |
this.state = state;
|
|
|
113 |
}
|
|
|
114 |
public String getState() {
|
|
|
115 |
return state;
|
|
|
116 |
}
|
|
|
117 |
public void setCountry(String country) {
|
|
|
118 |
this.country = country;
|
|
|
119 |
}
|
|
|
120 |
public String getCountry() {
|
|
|
121 |
return country;
|
|
|
122 |
}
|
|
|
123 |
public void setPhoneNumber(String phoneNumber) {
|
|
|
124 |
this.phoneNumber = phoneNumber;
|
|
|
125 |
}
|
|
|
126 |
public String getPhoneNumber() {
|
|
|
127 |
return phoneNumber;
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
131 |
this.createTimestamp = createTimestamp;
|
|
|
132 |
}
|
|
|
133 |
public LocalDateTime getCreateTimestamp() {
|
|
|
134 |
return createTimestamp;
|
|
|
135 |
}
|
|
|
136 |
|
|
|
137 |
public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
|
|
|
138 |
this.updateTimestamp = updateTimestamp;
|
|
|
139 |
}
|
|
|
140 |
public LocalDateTime getUpdateTimestamp() {
|
|
|
141 |
return updateTimestamp;
|
|
|
142 |
}
|
|
|
143 |
|
|
|
144 |
public int getCustomerId() {
|
|
|
145 |
return customerId;
|
|
|
146 |
}
|
|
|
147 |
public void setCustomerId(int customerId) {
|
|
|
148 |
this.customerId = customerId;
|
|
|
149 |
}
|
| 21924 |
ashik.ali |
150 |
|
|
|
151 |
|
| 21710 |
ashik.ali |
152 |
@Override
|
| 21924 |
ashik.ali |
153 |
public int hashCode() {
|
|
|
154 |
final int prime = 31;
|
|
|
155 |
int result = 1;
|
|
|
156 |
result = prime * result + ((city == null) ? 0 : city.hashCode());
|
|
|
157 |
result = prime * result + ((country == null) ? 0 : country.hashCode());
|
|
|
158 |
result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
|
|
|
159 |
result = prime * result + customerId;
|
|
|
160 |
result = prime * result + id;
|
|
|
161 |
result = prime * result + ((landmark == null) ? 0 : landmark.hashCode());
|
|
|
162 |
result = prime * result + ((line1 == null) ? 0 : line1.hashCode());
|
|
|
163 |
result = prime * result + ((line2 == null) ? 0 : line2.hashCode());
|
|
|
164 |
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
|
|
165 |
result = prime * result + ((phoneNumber == null) ? 0 : phoneNumber.hashCode());
|
|
|
166 |
result = prime * result + ((pinCode == null) ? 0 : pinCode.hashCode());
|
|
|
167 |
result = prime * result + ((state == null) ? 0 : state.hashCode());
|
|
|
168 |
result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
|
|
|
169 |
return result;
|
|
|
170 |
}
|
|
|
171 |
@Override
|
|
|
172 |
public boolean equals(Object obj) {
|
|
|
173 |
if (this == obj)
|
|
|
174 |
return true;
|
|
|
175 |
if (obj == null)
|
|
|
176 |
return false;
|
|
|
177 |
if (getClass() != obj.getClass())
|
|
|
178 |
return false;
|
|
|
179 |
CustomerAddress other = (CustomerAddress) obj;
|
|
|
180 |
if (city == null) {
|
|
|
181 |
if (other.city != null)
|
|
|
182 |
return false;
|
|
|
183 |
} else if (!city.equals(other.city))
|
|
|
184 |
return false;
|
|
|
185 |
if (country == null) {
|
|
|
186 |
if (other.country != null)
|
|
|
187 |
return false;
|
|
|
188 |
} else if (!country.equals(other.country))
|
|
|
189 |
return false;
|
|
|
190 |
if (createTimestamp == null) {
|
|
|
191 |
if (other.createTimestamp != null)
|
|
|
192 |
return false;
|
|
|
193 |
} else if (!createTimestamp.equals(other.createTimestamp))
|
|
|
194 |
return false;
|
|
|
195 |
if (customerId != other.customerId)
|
|
|
196 |
return false;
|
|
|
197 |
if (id != other.id)
|
|
|
198 |
return false;
|
|
|
199 |
if (landmark == null) {
|
|
|
200 |
if (other.landmark != null)
|
|
|
201 |
return false;
|
|
|
202 |
} else if (!landmark.equals(other.landmark))
|
|
|
203 |
return false;
|
|
|
204 |
if (line1 == null) {
|
|
|
205 |
if (other.line1 != null)
|
|
|
206 |
return false;
|
|
|
207 |
} else if (!line1.equals(other.line1))
|
|
|
208 |
return false;
|
|
|
209 |
if (line2 == null) {
|
|
|
210 |
if (other.line2 != null)
|
|
|
211 |
return false;
|
|
|
212 |
} else if (!line2.equals(other.line2))
|
|
|
213 |
return false;
|
|
|
214 |
if (name == null) {
|
|
|
215 |
if (other.name != null)
|
|
|
216 |
return false;
|
|
|
217 |
} else if (!name.equals(other.name))
|
|
|
218 |
return false;
|
|
|
219 |
if (phoneNumber == null) {
|
|
|
220 |
if (other.phoneNumber != null)
|
|
|
221 |
return false;
|
|
|
222 |
} else if (!phoneNumber.equals(other.phoneNumber))
|
|
|
223 |
return false;
|
|
|
224 |
if (pinCode == null) {
|
|
|
225 |
if (other.pinCode != null)
|
|
|
226 |
return false;
|
|
|
227 |
} else if (!pinCode.equals(other.pinCode))
|
|
|
228 |
return false;
|
|
|
229 |
if (state == null) {
|
|
|
230 |
if (other.state != null)
|
|
|
231 |
return false;
|
|
|
232 |
} else if (!state.equals(other.state))
|
|
|
233 |
return false;
|
|
|
234 |
if (updateTimestamp == null) {
|
|
|
235 |
if (other.updateTimestamp != null)
|
|
|
236 |
return false;
|
|
|
237 |
} else if (!updateTimestamp.equals(other.updateTimestamp))
|
|
|
238 |
return false;
|
|
|
239 |
return true;
|
|
|
240 |
}
|
|
|
241 |
@Override
|
| 21710 |
ashik.ali |
242 |
public String toString() {
|
|
|
243 |
return "CustomerAddress [id=" + id + ", name=" + name + ", line1=" + line1 + ", line2=" + line2 + ", landmark="
|
|
|
244 |
+ landmark + ", city=" + city + ", state=" + state + ", pinCode=" + pinCode + ", country=" + country
|
|
|
245 |
+ ", phoneNumber=" + phoneNumber + ", customerId=" + customerId + ", createTimestamp=" + createTimestamp
|
|
|
246 |
+ ", updateTimestamp=" + updateTimestamp + "]";
|
|
|
247 |
}
|
|
|
248 |
|
|
|
249 |
|
|
|
250 |
|
|
|
251 |
}
|