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

    @Basic(optional = false)
    @Column(name = "CHECKBOOKTYPECATALOG")
    private String checkbooktypecatalog;
    @Basic(optional = false)
    @Column(name = "CHECKBOOKTYPECATALOGCODE")
    private String checkbooktypecatalogcode;
    @Basic(optional = false)
    @Column(name = "COMPANYCODE")
    private long companycode;
    @Basic(optional = false)
    @Column(name = "CURRENCYCODE")
    private String currencycode;

    public TgenechargescheckbookPK() {
    }

    public TgenechargescheckbookPK(String checkbooktypecatalog, String checkbooktypecatalogcode, long companycode, String currencycode) {
        this.checkbooktypecatalog = checkbooktypecatalog;
        this.checkbooktypecatalogcode = checkbooktypecatalogcode;
        this.companycode = companycode;
        this.currencycode = currencycode;
    }

    public String getCheckbooktypecatalog() {
        return checkbooktypecatalog;
    }

    public void setCheckbooktypecatalog(String checkbooktypecatalog) {
        this.checkbooktypecatalog = checkbooktypecatalog;
    }

    public String getCheckbooktypecatalogcode() {
        return checkbooktypecatalogcode;
    }

    public void setCheckbooktypecatalogcode(String checkbooktypecatalogcode) {
        this.checkbooktypecatalogcode = checkbooktypecatalogcode;
    }

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

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenechargescheckbookPK[ checkbooktypecatalog=" + checkbooktypecatalog + ", checkbooktypecatalogcode=" + checkbooktypecatalogcode + ", companycode=" + companycode + ", currencycode=" + currencycode + " ]";
    }
    
}
