/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.qsoft.rs.sincoar.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author developer2
 */
@Embeddable
public class TgenecitydescPK implements Serializable {

    @Basic(optional = false)
    @Column(name = "COUNTRYCODE")
    private String countrycode;
    @Basic(optional = false)
    @Column(name = "PROVINCECODE")
    private String provincecode;
    @Basic(optional = false)
    @Column(name = "CANTONCODE")
    private String cantoncode;
    @Basic(optional = false)
    @Column(name = "CITYCODE")
    private String citycode;
    @Basic(optional = false)
    @Column(name = "LANGUAGE")
    private String language;

    public TgenecitydescPK() {
    }

    public TgenecitydescPK(String countrycode, String provincecode, String cantoncode, String citycode, String language) {
        this.countrycode = countrycode;
        this.provincecode = provincecode;
        this.cantoncode = cantoncode;
        this.citycode = citycode;
        this.language = language;
    }

    public String getCountrycode() {
        return countrycode;
    }

    public void setCountrycode(String countrycode) {
        this.countrycode = countrycode;
    }

    public String getProvincecode() {
        return provincecode;
    }

    public void setProvincecode(String provincecode) {
        this.provincecode = provincecode;
    }

    public String getCantoncode() {
        return cantoncode;
    }

    public void setCantoncode(String cantoncode) {
        this.cantoncode = cantoncode;
    }

    public String getCitycode() {
        return citycode;
    }

    public void setCitycode(String citycode) {
        this.citycode = citycode;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (countrycode != null ? countrycode.hashCode() : 0);
        hash += (provincecode != null ? provincecode.hashCode() : 0);
        hash += (cantoncode != null ? cantoncode.hashCode() : 0);
        hash += (citycode != null ? citycode.hashCode() : 0);
        hash += (language != null ? language.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TgenecitydescPK)) {
            return false;
        }
        TgenecitydescPK other = (TgenecitydescPK) object;
        if ((this.countrycode == null && other.countrycode != null) || (this.countrycode != null && !this.countrycode.equals(other.countrycode))) {
            return false;
        }
        if ((this.provincecode == null && other.provincecode != null) || (this.provincecode != null && !this.provincecode.equals(other.provincecode))) {
            return false;
        }
        if ((this.cantoncode == null && other.cantoncode != null) || (this.cantoncode != null && !this.cantoncode.equals(other.cantoncode))) {
            return false;
        }
        if ((this.citycode == null && other.citycode != null) || (this.citycode != null && !this.citycode.equals(other.citycode))) {
            return false;
        }
        if ((this.language == null && other.language != null) || (this.language != null && !this.language.equals(other.language))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenecitydescPK[ countrycode=" + countrycode + ", provincecode=" + provincecode + ", cantoncode=" + cantoncode + ", citycode=" + citycode + ", language=" + language + " ]";
    }
    
}
