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

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

    public TgenesubproductPK() {
    }

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

    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;
    }

    public String getSubproductcode() {
        return subproductcode;
    }

    public void setSubproductcode(String subproductcode) {
        this.subproductcode = subproductcode;
    }

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

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