/*
 * 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 java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author developer2
 */
@Embeddable
public class TgeneratesgroupPK 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 = "RATECATALOG")
    private String ratecatalog;
    @Basic(optional = false)
    @Column(name = "RATECATALOGCODE")
    private String ratecatalogcode;
    @Basic(optional = false)
    @Column(name = "COMPANYCODE")
    private long companycode;
    @Basic(optional = false)
    @Column(name = "CURRENCYCODE")
    private String currencycode;
    @Basic(optional = false)
    @Column(name = "MINTERM")
    private int minterm;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Basic(optional = false)
    @Column(name = "MINAMOUNT")
    private BigDecimal minamount;

    public TgeneratesgroupPK() {
    }

    public TgeneratesgroupPK(String interestbalancetype, String interestbalancegroup, String ratecatalog, String ratecatalogcode, long companycode, String currencycode, int minterm, BigDecimal minamount) {
        this.interestbalancetype = interestbalancetype;
        this.interestbalancegroup = interestbalancegroup;
        this.ratecatalog = ratecatalog;
        this.ratecatalogcode = ratecatalogcode;
        this.companycode = companycode;
        this.currencycode = currencycode;
        this.minterm = minterm;
        this.minamount = minamount;
    }

    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 getRatecatalog() {
        return ratecatalog;
    }

    public void setRatecatalog(String ratecatalog) {
        this.ratecatalog = ratecatalog;
    }

    public String getRatecatalogcode() {
        return ratecatalogcode;
    }

    public void setRatecatalogcode(String ratecatalogcode) {
        this.ratecatalogcode = ratecatalogcode;
    }

    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 int getMinterm() {
        return minterm;
    }

    public void setMinterm(int minterm) {
        this.minterm = minterm;
    }

    public BigDecimal getMinamount() {
        return minamount;
    }

    public void setMinamount(BigDecimal minamount) {
        this.minamount = minamount;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (interestbalancetype != null ? interestbalancetype.hashCode() : 0);
        hash += (interestbalancegroup != null ? interestbalancegroup.hashCode() : 0);
        hash += (ratecatalog != null ? ratecatalog.hashCode() : 0);
        hash += (ratecatalogcode != null ? ratecatalogcode.hashCode() : 0);
        hash += (int) companycode;
        hash += (currencycode != null ? currencycode.hashCode() : 0);
        hash += (int) minterm;
        hash += (minamount != null ? minamount.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 TgeneratesgroupPK)) {
            return false;
        }
        TgeneratesgroupPK other = (TgeneratesgroupPK) 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.ratecatalog == null && other.ratecatalog != null) || (this.ratecatalog != null && !this.ratecatalog.equals(other.ratecatalog))) {
            return false;
        }
        if ((this.ratecatalogcode == null && other.ratecatalogcode != null) || (this.ratecatalogcode != null && !this.ratecatalogcode.equals(other.ratecatalogcode))) {
            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.minterm != other.minterm) {
            return false;
        }
        if ((this.minamount == null && other.minamount != null) || (this.minamount != null && !this.minamount.equals(other.minamount))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgeneratesgroupPK[ interestbalancetype=" + interestbalancetype + ", interestbalancegroup=" + interestbalancegroup + ", ratecatalog=" + ratecatalog + ", ratecatalogcode=" + ratecatalogcode + ", companycode=" + companycode + ", currencycode=" + currencycode + ", minterm=" + minterm + ", minamount=" + minamount + " ]";
    }
    
}
