/*
 * 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.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author developer2
 */
@Embeddable
public class TgenecurrencyrategroupPK implements Serializable {

    @Basic(optional = false)
    @Column(name = "CURRENCYRATECATALOG")
    private String currencyratecatalog;
    @Basic(optional = false)
    @Column(name = "CURRENCYRATECATALOGCODE")
    private String currencyratecatalogcode;
    @Basic(optional = false)
    @Column(name = "CURRENCYCODE")
    private String currencycode;
    @Basic(optional = false)
    @Column(name = "DATETO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateto;

    public TgenecurrencyrategroupPK() {
    }

    public TgenecurrencyrategroupPK(String currencyratecatalog, String currencyratecatalogcode, String currencycode, Date dateto) {
        this.currencyratecatalog = currencyratecatalog;
        this.currencyratecatalogcode = currencyratecatalogcode;
        this.currencycode = currencycode;
        this.dateto = dateto;
    }

    public String getCurrencyratecatalog() {
        return currencyratecatalog;
    }

    public void setCurrencyratecatalog(String currencyratecatalog) {
        this.currencyratecatalog = currencyratecatalog;
    }

    public String getCurrencyratecatalogcode() {
        return currencyratecatalogcode;
    }

    public void setCurrencyratecatalogcode(String currencyratecatalogcode) {
        this.currencyratecatalogcode = currencyratecatalogcode;
    }

    public String getCurrencycode() {
        return currencycode;
    }

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

    public Date getDateto() {
        return dateto;
    }

    public void setDateto(Date dateto) {
        this.dateto = dateto;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenecurrencyrategroupPK[ currencyratecatalog=" + currencyratecatalog + ", currencyratecatalogcode=" + currencyratecatalogcode + ", currencycode=" + currencycode + ", dateto=" + dateto + " ]";
    }
    
}
