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

    @Basic(optional = false)
    @Column(name = "ACCOUNTCODE")
    private String accountcode;
    @Basic(optional = false)
    @Column(name = "BALANCECATALOG")
    private String balancecatalog;
    @Basic(optional = false)
    @Column(name = "BALANCECATALOGCODE")
    private String balancecatalogcode;

    public TcustbalanceaccountPK() {
    }

    public TcustbalanceaccountPK(String accountcode, String balancecatalog, String balancecatalogcode) {
        this.accountcode = accountcode;
        this.balancecatalog = balancecatalog;
        this.balancecatalogcode = balancecatalogcode;
    }

    public String getAccountcode() {
        return accountcode;
    }

    public void setAccountcode(String accountcode) {
        this.accountcode = accountcode;
    }

    public String getBalancecatalog() {
        return balancecatalog;
    }

    public void setBalancecatalog(String balancecatalog) {
        this.balancecatalog = balancecatalog;
    }

    public String getBalancecatalogcode() {
        return balancecatalogcode;
    }

    public void setBalancecatalogcode(String balancecatalogcode) {
        this.balancecatalogcode = balancecatalogcode;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (accountcode != null ? accountcode.hashCode() : 0);
        hash += (balancecatalog != null ? balancecatalog.hashCode() : 0);
        hash += (balancecatalogcode != null ? balancecatalogcode.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 TcustbalanceaccountPK)) {
            return false;
        }
        TcustbalanceaccountPK other = (TcustbalanceaccountPK) object;
        if ((this.accountcode == null && other.accountcode != null) || (this.accountcode != null && !this.accountcode.equals(other.accountcode))) {
            return false;
        }
        if ((this.balancecatalog == null && other.balancecatalog != null) || (this.balancecatalog != null && !this.balancecatalog.equals(other.balancecatalog))) {
            return false;
        }
        if ((this.balancecatalogcode == null && other.balancecatalogcode != null) || (this.balancecatalogcode != null && !this.balancecatalogcode.equals(other.balancecatalogcode))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TcustbalanceaccountPK[ accountcode=" + accountcode + ", balancecatalog=" + balancecatalog + ", balancecatalogcode=" + balancecatalogcode + " ]";
    }
    
}
