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

    @Basic(optional = false)
    @Column(name = "CATALOG")
    private String catalog;
    @Basic(optional = false)
    @Column(name = "DAY")
    private short day;

    public TgenenotaccountingdayPK() {
    }

    public TgenenotaccountingdayPK(String catalog, short day) {
        this.catalog = catalog;
        this.day = day;
    }

    public String getCatalog() {
        return catalog;
    }

    public void setCatalog(String catalog) {
        this.catalog = catalog;
    }

    public short getDay() {
        return day;
    }

    public void setDay(short day) {
        this.day = day;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenenotaccountingdayPK[ catalog=" + catalog + ", day=" + day + " ]";
    }
    
}
