/*
 * 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 TgenemessagedescPK implements Serializable {

    @Basic(optional = false)
    @Column(name = "MESSAGECODE")
    private String messagecode;
    @Basic(optional = false)
    @Column(name = "LANGUAGE")
    private String language;

    public TgenemessagedescPK() {
    }

    public TgenemessagedescPK(String messagecode, String language) {
        this.messagecode = messagecode;
        this.language = language;
    }

    public String getMessagecode() {
        return messagecode;
    }

    public void setMessagecode(String messagecode) {
        this.messagecode = messagecode;
    }

    public String getLanguage() {
        return language;
    }

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

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (messagecode != null ? messagecode.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 TgenemessagedescPK)) {
            return false;
        }
        TgenemessagedescPK other = (TgenemessagedescPK) object;
        if ((this.messagecode == null && other.messagecode != null) || (this.messagecode != null && !this.messagecode.equals(other.messagecode))) {
            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.TgenemessagedescPK[ messagecode=" + messagecode + ", language=" + language + " ]";
    }
    
}
