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

    @Basic(optional = false)
    @Column(name = "PERSONCODE")
    private long personcode;
    @Basic(optional = false)
    @Column(name = "DATETO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateto;
    @Basic(optional = false)
    @Column(name = "MANAGERPERSONCODE")
    private long managerpersoncode;
    @Basic(optional = false)
    @Column(name = "APPOINTMENTCATALOG")
    private String appointmentcatalog;
    @Basic(optional = false)
    @Column(name = "APPOINTMENTCATALOGCODE")
    private String appointmentcatalogcode;

    public TcustcompanymanagersPK() {
    }

    public TcustcompanymanagersPK(long personcode, Date dateto, long managerpersoncode, String appointmentcatalog, String appointmentcatalogcode) {
        this.personcode = personcode;
        this.dateto = dateto;
        this.managerpersoncode = managerpersoncode;
        this.appointmentcatalog = appointmentcatalog;
        this.appointmentcatalogcode = appointmentcatalogcode;
    }

    public long getPersoncode() {
        return personcode;
    }

    public void setPersoncode(long personcode) {
        this.personcode = personcode;
    }

    public Date getDateto() {
        return dateto;
    }

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

    public long getManagerpersoncode() {
        return managerpersoncode;
    }

    public void setManagerpersoncode(long managerpersoncode) {
        this.managerpersoncode = managerpersoncode;
    }

    public String getAppointmentcatalog() {
        return appointmentcatalog;
    }

    public void setAppointmentcatalog(String appointmentcatalog) {
        this.appointmentcatalog = appointmentcatalog;
    }

    public String getAppointmentcatalogcode() {
        return appointmentcatalogcode;
    }

    public void setAppointmentcatalogcode(String appointmentcatalogcode) {
        this.appointmentcatalogcode = appointmentcatalogcode;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TcustcompanymanagersPK[ personcode=" + personcode + ", dateto=" + dateto + ", managerpersoncode=" + managerpersoncode + ", appointmentcatalog=" + appointmentcatalog + ", appointmentcatalogcode=" + appointmentcatalogcode + " ]";
    }
    
}
