Subversion Repositories SmartDukaan

Rev

Rev 28381 | 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.fofo;

import java.io.Serializable;

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 = "fofo.pincode_partner", schema = "fofo")
public class PincodePartner implements Serializable {

        private static final long serialVersionUID = 1L;

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

        @Column(name = "pincode")
        private String pincode;

        @Override
        public String toString() {
                return "PincodePartner [id=" + id + ", fofoId=" + fofoId + ", pincode=" + pincode + "]";
        }

        public int getId() {
                return id;
        }

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

        public int getFofoId() {
                return fofoId;
        }

        public void setFofoId(int fofoId) {
                this.fofoId = fofoId;
        }

        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + fofoId;
                result = prime * result + id;
                result = prime * result + ((pincode == null) ? 0 : pincode.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;
                PincodePartner other = (PincodePartner) obj;
                if (fofoId != other.fofoId)
                        return false;
                if (id != other.id)
                        return false;
                if (pincode == null) {
                        if (other.pincode != null)
                                return false;
                } else if (!pincode.equals(other.pincode))
                        return false;
                return true;
        }
        
        
}