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

    @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;
    @Basic(optional = false)
    @Column(name = "RATESEQUENCE")
    private short ratesequence;

    public TgenechargesPK() {
    }

    public TgenechargesPK(String balancetype, String balancegroup, String modulecode, String statuscode, long companycode, String currencycode, short ratesequence) {
        this.balancetype = balancetype;
        this.balancegroup = balancegroup;
        this.modulecode = modulecode;
        this.statuscode = statuscode;
        this.companycode = companycode;
        this.currencycode = currencycode;
        this.ratesequence = ratesequence;
    }

    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 short getRatesequence() {
        return ratesequence;
    }

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

    @Override
    public int hashCode() {
        int hash = 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 += (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 TgenechargesPK)) {
            return false;
        }
        TgenechargesPK other = (TgenechargesPK) object;
        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.ratesequence != other.ratesequence) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenechargesPK[ balancetype=" + balancetype + ", balancegroup=" + balancegroup + ", modulecode=" + modulecode + ", statuscode=" + statuscode + ", companycode=" + companycode + ", currencycode=" + currencycode + ", ratesequence=" + ratesequence + " ]";
    }
    
}
