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

    @Basic(optional = false)
    @Column(name = "CSOLICITUD")
    private String csolicitud;
    @Basic(optional = false)
    @Column(name = "CEMPRESA")
    private long cempresa;
    @Basic(optional = false)
    @Column(name = "CGUARDIA")
    private long cguardia;

    public TarmsolicitudguardiasPK() {
    }

    public TarmsolicitudguardiasPK(String csolicitud, long cempresa, long cguardia) {
        this.csolicitud = csolicitud;
        this.cempresa = cempresa;
        this.cguardia = cguardia;
    }

    public String getCsolicitud() {
        return csolicitud;
    }

    public void setCsolicitud(String csolicitud) {
        this.csolicitud = csolicitud;
    }

    public long getCempresa() {
        return cempresa;
    }

    public void setCempresa(long cempresa) {
        this.cempresa = cempresa;
    }

    public long getCguardia() {
        return cguardia;
    }

    public void setCguardia(long cguardia) {
        this.cguardia = cguardia;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TarmsolicitudguardiasPK[ csolicitud=" + csolicitud + ", cempresa=" + cempresa + ", cguardia=" + cguardia + " ]";
    }
    
}
