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

    @Basic(optional = false)
    @Column(name = "CLECTURA")
    private long clectura;
    @Basic(optional = false)
    @Column(name = "CODIGOTAG")
    private String codigotag;

    public TarmlecturadetallePK() {
    }

    public TarmlecturadetallePK(long clectura, String codigotag) {
        this.clectura = clectura;
        this.codigotag = codigotag;
    }

    public long getClectura() {
        return clectura;
    }

    public void setClectura(long clectura) {
        this.clectura = clectura;
    }

    public String getCodigotag() {
        return codigotag;
    }

    public void setCodigotag(String codigotag) {
        this.codigotag = codigotag;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TarmlecturadetallePK[ clectura=" + clectura + ", codigotag=" + codigotag + " ]";
    }
    
}
