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

    @Basic(optional = false)
    @Column(name = "CHARGECATALOG")
    private String chargecatalog;
    @Basic(optional = false)
    @Column(name = "CHARGECATALOGCODE")
    private String chargecatalogcode;
    @Basic(optional = false)
    @Column(name = "BALANCETYPE")
    private String balancetype;
    @Basic(optional = false)
    @Column(name = "BALANCEGROUP")
    private String balancegroup;
    @Basic(optional = false)
    @Column(name = "MODULECODE")
    private String modulecode;
    @Basic(optional = false)
    @Column(name = "STATUSCODE")
    private String statuscode;
    @Basic(optional = false)
    @Column(name = "COMPANYCODE")
    private long companycode;
    @Basic(optional = false)
    @Column(name = "CURRENCYCODE")
    private String currencycode;
    // @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 TgenechargesgroupPK() {
    }

    public TgenechargesgroupPK(String chargecatalog, String chargecatalogcode, String balancetype, String balancegroup, String modulecode, String statuscode, long companycode, String currencycode, BigDecimal minamount) {
        this.chargecatalog = chargecatalog;
        this.chargecatalogcode = chargecatalogcode;
        this.balancetype = balancetype;
        this.balancegroup = balancegroup;
        this.modulecode = modulecode;
        this.statuscode = statuscode;
        this.companycode = companycode;
        this.currencycode = currencycode;
        this.minamount = minamount;
    }

    public String getChargecatalog() {
        return chargecatalog;
    }

    public void setChargecatalog(String chargecatalog) {
        this.chargecatalog = chargecatalog;
    }

    public String getChargecatalogcode() {
        return chargecatalogcode;
    }

    public void setChargecatalogcode(String chargecatalogcode) {
        this.chargecatalogcode = chargecatalogcode;
    }

    public String getBalancetype() {
        return balancetype;
    }

    public void setBalancetype(String balancetype) {
        this.balancetype = balancetype;
    }

    public String getBalancegroup() {
        return balancegroup;
    }

    public void setBalancegroup(String balancegroup) {
        this.balancegroup = balancegroup;
    }

    public String getModulecode() {
        return modulecode;
    }

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

    public String getStatuscode() {
        return statuscode;
    }

    public void setStatuscode(String statuscode) {
        this.statuscode = statuscode;
    }

    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 BigDecimal getMinamount() {
        return minamount;
    }

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

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (chargecatalog != null ? chargecatalog.hashCode() : 0);
        hash += (chargecatalogcode != null ? chargecatalogcode.hashCode() : 0);
        hash += (balancetype != null ? balancetype.hashCode() : 0);
        hash += (balancegroup != null ? balancegroup.hashCode() : 0);
        hash += (modulecode != null ? modulecode.hashCode() : 0);
        hash += (statuscode != null ? statuscode.hashCode() : 0);
        hash += (int) companycode;
        hash += (currencycode != null ? currencycode.hashCode() : 0);
        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 TgenechargesgroupPK)) {
            return false;
        }
        TgenechargesgroupPK other = (TgenechargesgroupPK) object;
        if ((this.chargecatalog == null && other.chargecatalog != null) || (this.chargecatalog != null && !this.chargecatalog.equals(other.chargecatalog))) {
            return false;
        }
        if ((this.chargecatalogcode == null && other.chargecatalogcode != null) || (this.chargecatalogcode != null && !this.chargecatalogcode.equals(other.chargecatalogcode))) {
            return false;
        }
        if ((this.balancetype == null && other.balancetype != null) || (this.balancetype != null && !this.balancetype.equals(other.balancetype))) {
            return false;
        }
        if ((this.balancegroup == null && other.balancegroup != null) || (this.balancegroup != null && !this.balancegroup.equals(other.balancegroup))) {
            return false;
        }
        if ((this.modulecode == null && other.modulecode != null) || (this.modulecode != null && !this.modulecode.equals(other.modulecode))) {
            return false;
        }
        if ((this.statuscode == null && other.statuscode != null) || (this.statuscode != null && !this.statuscode.equals(other.statuscode))) {
            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.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.TgenechargesgroupPK[ chargecatalog=" + chargecatalog + ", chargecatalogcode=" + chargecatalogcode + ", balancetype=" + balancetype + ", balancegroup=" + balancegroup + ", modulecode=" + modulecode + ", statuscode=" + statuscode + ", companycode=" + companycode + ", currencycode=" + currencycode + ", minamount=" + minamount + " ]";
    }
    
}
