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

    @Basic(optional = false)
    @Column(name = "MODULECODE")
    private String modulecode;
    @Basic(optional = false)
    @Column(name = "PRODUCTCODE")
    private String productcode;

    public TgeneproductPK() {
    }

    public TgeneproductPK(String modulecode, String productcode) {
        this.modulecode = modulecode;
        this.productcode = productcode;
    }

    public String getModulecode() {
        return modulecode;
    }

    public void setModulecode(String modulecode) {
        this.modulecode = modulecode;
    }

    public String getProductcode() {
        return productcode;
    }

    public void setProductcode(String productcode) {
        this.productcode = productcode;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgeneproductPK[ modulecode=" + modulecode + ", productcode=" + productcode + " ]";
    }
    
}
