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

    @Basic(optional = false)
    @Column(name = "CONCEPTMODULE")
    private String conceptmodule;
    @Basic(optional = false)
    @Column(name = "CONCEPTCODE")
    private short conceptcode;

    public TgeneconceptPK() {
    }

    public TgeneconceptPK(String conceptmodule, short conceptcode) {
        this.conceptmodule = conceptmodule;
        this.conceptcode = conceptcode;
    }

    public String getConceptmodule() {
        return conceptmodule;
    }

    public void setConceptmodule(String conceptmodule) {
        this.conceptmodule = conceptmodule;
    }

    public short getConceptcode() {
        return conceptcode;
    }

    public void setConceptcode(short conceptcode) {
        this.conceptcode = conceptcode;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (conceptmodule != null ? conceptmodule.hashCode() : 0);
        hash += (int) conceptcode;
        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 TgeneconceptPK)) {
            return false;
        }
        TgeneconceptPK other = (TgeneconceptPK) object;
        if ((this.conceptmodule == null && other.conceptmodule != null) || (this.conceptmodule != null && !this.conceptmodule.equals(other.conceptmodule))) {
            return false;
        }
        if (this.conceptcode != other.conceptcode) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgeneconceptPK[ conceptmodule=" + conceptmodule + ", conceptcode=" + conceptcode + " ]";
    }
    
}
