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

    @Basic(optional = false)
    @Column(name = "BASERATECATALOG")
    private String baseratecatalog;
    @Basic(optional = false)
    @Column(name = "BASERATECATALOGCODE")
    private String baseratecatalogcode;
    @Basic(optional = false)
    @Column(name = "CURRENCYCODE")
    private String currencycode;
    @Basic(optional = false)
    @Column(name = "RATESEQUENCE")
    private int ratesequence;

    public TgenebaseratedetailPK() {
    }

    public TgenebaseratedetailPK(String baseratecatalog, String baseratecatalogcode, String currencycode, int ratesequence) {
        this.baseratecatalog = baseratecatalog;
        this.baseratecatalogcode = baseratecatalogcode;
        this.currencycode = currencycode;
        this.ratesequence = ratesequence;
    }

    public String getBaseratecatalog() {
        return baseratecatalog;
    }

    public void setBaseratecatalog(String baseratecatalog) {
        this.baseratecatalog = baseratecatalog;
    }

    public String getBaseratecatalogcode() {
        return baseratecatalogcode;
    }

    public void setBaseratecatalogcode(String baseratecatalogcode) {
        this.baseratecatalogcode = baseratecatalogcode;
    }

    public String getCurrencycode() {
        return currencycode;
    }

    public void setCurrencycode(String currencycode) {
        this.currencycode = currencycode;
    }

    public int getRatesequence() {
        return ratesequence;
    }

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

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (baseratecatalog != null ? baseratecatalog.hashCode() : 0);
        hash += (baseratecatalogcode != null ? baseratecatalogcode.hashCode() : 0);
        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 TgenebaseratedetailPK)) {
            return false;
        }
        TgenebaseratedetailPK other = (TgenebaseratedetailPK) object;
        if ((this.baseratecatalog == null && other.baseratecatalog != null) || (this.baseratecatalog != null && !this.baseratecatalog.equals(other.baseratecatalog))) {
            return false;
        }
        if ((this.baseratecatalogcode == null && other.baseratecatalogcode != null) || (this.baseratecatalogcode != null && !this.baseratecatalogcode.equals(other.baseratecatalogcode))) {
            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.TgenebaseratedetailPK[ baseratecatalog=" + baseratecatalog + ", baseratecatalogcode=" + baseratecatalogcode + ", currencycode=" + currencycode + ", ratesequence=" + ratesequence + " ]";
    }
    
}
