Subversion Repositories SmartDukaan

Rev

Rev 28493 | Rev 32222 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.entity.warehouse;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "warehouse.supplier")
public class Supplier {

    @Id
    @Column(name = "id", unique = true, updatable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id; // required

    private String name; // required

    private String phone; // required
    private String fax; // required
    private String tin;
    private String pan; // required
    private String headName; // required
    private String headDesignation; // required
    private String headEmail; // required
    private String contactName; // required
    private String contactPhone; // required
    private String contactFax; // required
    private String contactEmail; // required
    private String registeredAddress; // required
    private String communicationAddress; // required
    private int stateId; // required
    private int poValidityLimit; // required
    private String gstin; // required
    private String tnc;
    @Column(name = "status")
    private boolean status;

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getTin() {
        return tin;
    }

    public void setTin(String tin) {
        this.tin = tin;
    }

    public String getPan() {
        return pan;
    }

    public void setPan(String pan) {
        this.pan = pan;
    }

    public String getHeadName() {
        return headName;
    }

    public void setHeadName(String headName) {
        this.headName = headName;
    }

    public String getHeadDesignation() {
        return headDesignation;
    }

    public void setHeadDesignation(String headDesignation) {
        this.headDesignation = headDesignation;
    }

    public String getHeadEmail() {
        return headEmail;
    }

    public void setHeadEmail(String headEmail) {
        this.headEmail = headEmail;
    }

    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public String getContactFax() {
        return contactFax;
    }

    public void setContactFax(String contactFax) {
        this.contactFax = contactFax;
    }

    public String getContactEmail() {
        return contactEmail;
    }

    public void setContactEmail(String contactEmail) {
        this.contactEmail = contactEmail;
    }

    public String getRegisteredAddress() {
        return registeredAddress;
    }

    public void setRegisteredAddress(String registeredAddress) {
        this.registeredAddress = registeredAddress;
    }

    public String getCommunicationAddress() {
        return communicationAddress;
    }

    public void setCommunicationAddress(String communicationAddress) {
        this.communicationAddress = communicationAddress;
    }

    public int getStateId() {
        return stateId;
    }

    public void setStateId(int stateId) {
        this.stateId = stateId;
    }

    public int getPoValidityLimit() {
        return poValidityLimit;
    }

    public void setPoValidityLimit(int poValidityLimit) {
        this.poValidityLimit = poValidityLimit;
    }

    public String getGstin() {
        return gstin;
    }

    public void setGstin(String gstin) {
        this.gstin = gstin;
    }

    public String getTnc() {
        return tnc;
    }

    public void setTnc(String tnc) {
        this.tnc = tnc;
    }

    public Supplier() {
        super();
        // TODO Auto-generated constructor stub
    }

    @Override
    public String toString() {
        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 + "]";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((communicationAddress == null) ? 0 : communicationAddress.hashCode());
        result = prime * result + ((contactEmail == null) ? 0 : contactEmail.hashCode());
        result = prime * result + ((contactFax == null) ? 0 : contactFax.hashCode());
        result = prime * result + ((contactName == null) ? 0 : contactName.hashCode());
        result = prime * result + ((contactPhone == null) ? 0 : contactPhone.hashCode());
        result = prime * result + ((fax == null) ? 0 : fax.hashCode());
        result = prime * result + ((gstin == null) ? 0 : gstin.hashCode());
        result = prime * result + ((headDesignation == null) ? 0 : headDesignation.hashCode());
        result = prime * result + ((headEmail == null) ? 0 : headEmail.hashCode());
        result = prime * result + ((headName == null) ? 0 : headName.hashCode());
        result = prime * result + id;
        result = prime * result + ((name == null) ? 0 : name.hashCode());
        result = prime * result + ((pan == null) ? 0 : pan.hashCode());
        result = prime * result + ((phone == null) ? 0 : phone.hashCode());
        result = prime * result + poValidityLimit;
        result = prime * result + ((registeredAddress == null) ? 0 : registeredAddress.hashCode());
        result = prime * result + stateId;
        result = prime * result + ((tin == null) ? 0 : tin.hashCode());
        result = prime * result + ((tnc == null) ? 0 : tnc.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Supplier other = (Supplier) obj;
        if (communicationAddress == null) {
            if (other.communicationAddress != null)
                return false;
        } else if (!communicationAddress.equals(other.communicationAddress))
            return false;
        if (contactEmail == null) {
            if (other.contactEmail != null)
                return false;
        } else if (!contactEmail.equals(other.contactEmail))
            return false;
        if (contactFax == null) {
            if (other.contactFax != null)
                return false;
        } else if (!contactFax.equals(other.contactFax))
            return false;
        if (contactName == null) {
            if (other.contactName != null)
                return false;
        } else if (!contactName.equals(other.contactName))
            return false;
        if (contactPhone == null) {
            if (other.contactPhone != null)
                return false;
        } else if (!contactPhone.equals(other.contactPhone))
            return false;
        if (fax == null) {
            if (other.fax != null)
                return false;
        } else if (!fax.equals(other.fax))
            return false;
        if (gstin == null) {
            if (other.gstin != null)
                return false;
        } else if (!gstin.equals(other.gstin))
            return false;
        if (headDesignation == null) {
            if (other.headDesignation != null)
                return false;
        } else if (!headDesignation.equals(other.headDesignation))
            return false;
        if (headEmail == null) {
            if (other.headEmail != null)
                return false;
        } else if (!headEmail.equals(other.headEmail))
            return false;
        if (headName == null) {
            if (other.headName != null)
                return false;
        } else if (!headName.equals(other.headName))
            return false;
        if (id != other.id)
            return false;
        if (name == null) {
            if (other.name != null)
                return false;
        } else if (!name.equals(other.name))
            return false;
        if (pan == null) {
            if (other.pan != null)
                return false;
        } else if (!pan.equals(other.pan))
            return false;
        if (phone == null) {
            if (other.phone != null)
                return false;
        } else if (!phone.equals(other.phone))
            return false;
        if (poValidityLimit != other.poValidityLimit)
            return false;
        if (registeredAddress == null) {
            if (other.registeredAddress != null)
                return false;
        } else if (!registeredAddress.equals(other.registeredAddress))
            return false;
        if (stateId != other.stateId)
            return false;
        if (tin == null) {
            if (other.tin != null)
                return false;
        } else if (!tin.equals(other.tin))
            return false;
        if (tnc == null) {
            if (other.tnc != null)
                return false;
        } else if (!tnc.equals(other.tnc))
            return false;
        return true;
    }

}