Subversion Repositories SmartDukaan

Rev

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

Rev 32222 Rev 32493
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.warehouse;
1
package com.spice.profitmandi.dao.entity.warehouse;
2
 
2
 
3
import javax.persistence.Column;
-
 
4
import javax.persistence.Entity;
-
 
5
import javax.persistence.GeneratedValue;
-
 
6
import javax.persistence.GenerationType;
-
 
7
import javax.persistence.Id;
3
import javax.persistence.*;
8
import javax.persistence.Table;
-
 
9
import java.util.Objects;
4
import java.util.Objects;
10
 
5
 
11
@Entity
6
@Entity
12
@Table(name = "warehouse.supplier")
7
@Table(name = "warehouse.supplier")
13
public class Supplier {
8
public class Supplier {
Line 34... Line 29...
34
    private String communicationAddress; // required
29
    private String communicationAddress; // required
35
    private int stateId; // required
30
    private int stateId; // required
36
    private int poValidityLimit; // requiredx
31
    private int poValidityLimit; // requiredx
37
    private String gstin; // required
32
    private String gstin; // required
38
    private String tnc;
33
    private String tnc;
-
 
34
    private Integer internalWarehouseId;
39
    @Column(name = "status")
35
    @Column(name = "status")
40
    private boolean status;
36
    private boolean status;
41
    private boolean internal;
37
    private boolean internal;
42
 
38
 
43
    public boolean isInternal() {
39
    public boolean isInternal() {
44
        return internal;
40
        return internal;
45
    }
41
    }
46
 
42
 
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) {
43
    public void setInternal(boolean internal) {
61
        this.internal = internal;
44
        this.internal = internal;
62
    }
45
    }
63
 
46
 
64
    public boolean isStatus() {
47
    public boolean isStatus() {
Line 224... Line 207...
224
    public Supplier() {
207
    public Supplier() {
225
        super();
208
        super();
226
        // TODO Auto-generated constructor stub
209
        // TODO Auto-generated constructor stub
227
    }
210
    }
228
 
211
 
-
 
212
    public Integer getInternalWarehouseId() {
-
 
213
        return internalWarehouseId;
-
 
214
    }
-
 
215
 
-
 
216
    public void setInternalWarehouseId(Integer internalWarehouseId) {
-
 
217
        this.internalWarehouseId = internalWarehouseId;
-
 
218
    }
-
 
219
 
229
    @Override
220
    @Override
230
    public String toString() {
221
    public boolean equals(Object o) {
-
 
222
        if (this == o) return true;
-
 
223
        if (o == null || getClass() != o.getClass()) return false;
-
 
224
        Supplier supplier = (Supplier) o;
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 + "]";
225
        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) && Objects.equals(internalWarehouseId, supplier.internalWarehouseId);
232
    }
226
    }
233
 
227
 
-
 
228
    @Override
-
 
229
    public int hashCode() {
-
 
230
        return Objects.hash(id, name, phone, fax, tin, pan, headName, headDesignation, headEmail, contactName, contactPhone, contactFax, contactEmail, registeredAddress, communicationAddress, stateId, poValidityLimit, gstin, tnc, internalWarehouseId, status, internal);
-
 
231
    }
-
 
232
 
-
 
233
    @Override
-
 
234
    public String toString() {
-
 
235
        return "Supplier{" +
-
 
236
                "id=" + id +
-
 
237
                ", name='" + name + '\'' +
-
 
238
                ", phone='" + phone + '\'' +
-
 
239
                ", fax='" + fax + '\'' +
-
 
240
                ", tin='" + tin + '\'' +
-
 
241
                ", pan='" + pan + '\'' +
-
 
242
                ", headName='" + headName + '\'' +
-
 
243
                ", headDesignation='" + headDesignation + '\'' +
-
 
244
                ", headEmail='" + headEmail + '\'' +
-
 
245
                ", contactName='" + contactName + '\'' +
-
 
246
                ", contactPhone='" + contactPhone + '\'' +
-
 
247
                ", contactFax='" + contactFax + '\'' +
-
 
248
                ", contactEmail='" + contactEmail + '\'' +
-
 
249
                ", registeredAddress='" + registeredAddress + '\'' +
-
 
250
                ", communicationAddress='" + communicationAddress + '\'' +
-
 
251
                ", stateId=" + stateId +
-
 
252
                ", poValidityLimit=" + poValidityLimit +
-
 
253
                ", gstin='" + gstin + '\'' +
-
 
254
                ", tnc='" + tnc + '\'' +
-
 
255
                ", internalWarehouseId=" + internalWarehouseId +
-
 
256
                ", status=" + status +
-
 
257
                ", internal=" + internal +
-
 
258
                '}';
-
 
259
    }
234
}
260
}