/*
 * 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 TegenecantondescPK 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 = "LANGUAGECODE")
    private String languagecode;

    public TegenecantondescPK() {
    }

    public TegenecantondescPK(String countrycode, String provincecode, String cantoncode, String languagecode) {
        this.countrycode = countrycode;
        this.provincecode = provincecode;
        this.cantoncode = cantoncode;
        this.languagecode = languagecode;
    }

    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 getLanguagecode() {
        return languagecode;
    }

    public void setLanguagecode(String languagecode) {
        this.languagecode = languagecode;
    }

    @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 += (languagecode != null ? languagecode.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 TegenecantondescPK)) {
            return false;
        }
        TegenecantondescPK other = (TegenecantondescPK) 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.languagecode == null && other.languagecode != null) || (this.languagecode != null && !this.languagecode.equals(other.languagecode))) {
            return false;
        }
        return true;
    }

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