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

    @Basic(optional = false)
    @Column(name = "INTERESTBALANCETYPE")
    private String interestbalancetype;
    @Basic(optional = false)
    @Column(name = "INTERESTBALANCEGROUP")
    private String interestbalancegroup;
    @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;
    @Basic(optional = false)
    @Column(name = "COMPANYCODE")
    private long companycode;
    @Basic(optional = false)
    @Column(name = "CURRENCYCODE")
    private String currencycode;
    @Basic(optional = false)
    @Column(name = "RATESEQUENCE")
    private short ratesequence;

    public TgenesubproductratePK() {
    }

    public TgenesubproductratePK(String interestbalancetype, String interestbalancegroup, String modulecode, String productcode, String subproductcode, long companycode, String currencycode, short ratesequence) {
        this.interestbalancetype = interestbalancetype;
        this.interestbalancegroup = interestbalancegroup;
        this.modulecode = modulecode;
        this.productcode = productcode;
        this.subproductcode = subproductcode;
        this.companycode = companycode;
        this.currencycode = currencycode;
        this.ratesequence = ratesequence;
    }

    public String getInterestbalancetype() {
        return interestbalancetype;
    }

    public void setInterestbalancetype(String interestbalancetype) {
        this.interestbalancetype = interestbalancetype;
    }

    public String getInterestbalancegroup() {
        return interestbalancegroup;
    }

    public void setInterestbalancegroup(String interestbalancegroup) {
        this.interestbalancegroup = interestbalancegroup;
    }

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

    public long getCompanycode() {
        return companycode;
    }

    public void setCompanycode(long companycode) {
        this.companycode = companycode;
    }

    public String getCurrencycode() {
        return currencycode;
    }

    public void setCurrencycode(String currencycode) {
        this.currencycode = currencycode;
    }

    public short getRatesequence() {
        return ratesequence;
    }

    public void setRatesequence(short ratesequence) {
        this.ratesequence = ratesequence;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenesubproductratePK[ interestbalancetype=" + interestbalancetype + ", interestbalancegroup=" + interestbalancegroup + ", modulecode=" + modulecode + ", productcode=" + productcode + ", subproductcode=" + subproductcode + ", companycode=" + companycode + ", currencycode=" + currencycode + ", ratesequence=" + ratesequence + " ]";
    }
    
}
