Subversion Repositories SmartDukaan

Rev

Rev 28493 | Rev 32222 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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