Subversion Repositories SmartDukaan

Rev

View as "text/plain" | Blame | Last modification | View Log | RSS feed

package com.spice.profitmandi.common.services.mandii;

import java.time.LocalDate;

public class Company {
        
        private String name;
        private String title;
        //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}
        private String pan;
        //"date_of_incorporation"
        private LocalDate dateOfIncorportaion;
        private String email;
        private String phone;
        private String gstin;
        //registration_type
        private CompanyRegistrationType registrationType; 
        private IndustryType industryType;
        //business_vintage
        private int businessVintage;
        //last_12_months_turnover
        private double last12MonthsTurnover;
        @Override
        public String toString() {
                return "Company [name=" + name + ", title=" + title + ", pan=" + pan + ", dateOfIncorportaion="
                                + dateOfIncorportaion + ", email=" + email + ", phone=" + phone + ", gstin=" + gstin
                                + ", registrationType=" + registrationType + ", industryType=" + industryType + ", businessVintage="
                                + businessVintage + ", last12MonthsTurnover=" + last12MonthsTurnover + "]";
        }
        public String getName() {
                return name;
        }
        public void setName(String name) {
                this.name = name;
        }
        public String getTitle() {
                return title;
        }
        public void setTitle(String title) {
                this.title = title;
        }
        public String getPan() {
                return pan;
        }
        public void setPan(String pan) {
                this.pan = pan;
        }
        public LocalDate getDateOfIncorportaion() {
                return dateOfIncorportaion;
        }
        public void setDateOfIncorportaion(LocalDate dateOfIncorportaion) {
                this.dateOfIncorportaion = dateOfIncorportaion;
        }
        public String getEmail() {
                return email;
        }
        public void setEmail(String email) {
                this.email = email;
        }
        public String getPhone() {
                return phone;
        }
        public void setPhone(String phone) {
                this.phone = phone;
        }
        public String getGstin() {
                return gstin;
        }
        public void setGstin(String gstin) {
                this.gstin = gstin;
        }
        public CompanyRegistrationType getRegistrationType() {
                return registrationType;
        }
        public void setRegistrationType(CompanyRegistrationType registrationType) {
                this.registrationType = registrationType;
        }
        public IndustryType getIndustryType() {
                return industryType;
        }
        public void setIndustryType(IndustryType industryType) {
                this.industryType = industryType;
        }
        public int getBusinessVintage() {
                return businessVintage;
        }
        public void setBusinessVintage(int businessVintage) {
                this.businessVintage = businessVintage;
        }
        public double getLast12MonthsTurnover() {
                return last12MonthsTurnover;
        }
        public void setLast12MonthsTurnover(double last12MonthsTurnover) {
                this.last12MonthsTurnover = last12MonthsTurnover;
        }
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + businessVintage;
                result = prime * result + ((dateOfIncorportaion == null) ? 0 : dateOfIncorportaion.hashCode());
                result = prime * result + ((email == null) ? 0 : email.hashCode());
                result = prime * result + ((gstin == null) ? 0 : gstin.hashCode());
                result = prime * result + ((industryType == null) ? 0 : industryType.hashCode());
                long temp;
                temp = Double.doubleToLongBits(last12MonthsTurnover);
                result = prime * result + (int) (temp ^ (temp >>> 32));
                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 + ((registrationType == null) ? 0 : registrationType.hashCode());
                result = prime * result + ((title == null) ? 0 : title.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;
                Company other = (Company) obj;
                if (businessVintage != other.businessVintage)
                        return false;
                if (dateOfIncorportaion == null) {
                        if (other.dateOfIncorportaion != null)
                                return false;
                } else if (!dateOfIncorportaion.equals(other.dateOfIncorportaion))
                        return false;
                if (email == null) {
                        if (other.email != null)
                                return false;
                } else if (!email.equals(other.email))
                        return false;
                if (gstin == null) {
                        if (other.gstin != null)
                                return false;
                } else if (!gstin.equals(other.gstin))
                        return false;
                if (industryType != other.industryType)
                        return false;
                if (Double.doubleToLongBits(last12MonthsTurnover) != Double.doubleToLongBits(other.last12MonthsTurnover))
                        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 (registrationType != other.registrationType)
                        return false;
                if (title == null) {
                        if (other.title != null)
                                return false;
                } else if (!title.equals(other.title))
                        return false;
                return true;
        }
        
        
        

}