/*
 * 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.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TARMINVENTARIOSUBIDOPORPERSONA")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tarminventariosubidoporpersona.findAll", query = "SELECT t FROM Tarminventariosubidoporpersona t"),
    @NamedQuery(name = "Tarminventariosubidoporpersona.findByPersoncode", query = "SELECT t FROM Tarminventariosubidoporpersona t WHERE t.tarminventariosubidoporpersonaPK.personcode = :personcode"),
    @NamedQuery(name = "Tarminventariosubidoporpersona.findByClase", query = "SELECT t FROM Tarminventariosubidoporpersona t WHERE t.tarminventariosubidoporpersonaPK.clase = :clase"),
    @NamedQuery(name = "Tarminventariosubidoporpersona.findByFechacarga", query = "SELECT t FROM Tarminventariosubidoporpersona t WHERE t.fechacarga = :fechacarga")})
public class Tarminventariosubidoporpersona implements Serializable {

    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected TarminventariosubidoporpersonaPK tarminventariosubidoporpersonaPK;
    @Column(name = "FECHACARGA")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechacarga;

    public Tarminventariosubidoporpersona() {
    }

    public Tarminventariosubidoporpersona(TarminventariosubidoporpersonaPK tarminventariosubidoporpersonaPK) {
        this.tarminventariosubidoporpersonaPK = tarminventariosubidoporpersonaPK;
    }

    public Tarminventariosubidoporpersona(long personcode, String clase) {
        this.tarminventariosubidoporpersonaPK = new TarminventariosubidoporpersonaPK(personcode, clase);
    }

    public TarminventariosubidoporpersonaPK getTarminventariosubidoporpersonaPK() {
        return tarminventariosubidoporpersonaPK;
    }

    public void setTarminventariosubidoporpersonaPK(TarminventariosubidoporpersonaPK tarminventariosubidoporpersonaPK) {
        this.tarminventariosubidoporpersonaPK = tarminventariosubidoporpersonaPK;
    }

    public Date getFechacarga() {
        return fechacarga;
    }

    public void setFechacarga(Date fechacarga) {
        this.fechacarga = fechacarga;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.Tarminventariosubidoporpersona[ tarminventariosubidoporpersonaPK=" + tarminventariosubidoporpersonaPK + " ]";
    }
    
}
