/*
 * 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.math.BigInteger;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TARMEVALUACION")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tarmevaluacion.findAll", query = "SELECT t FROM Tarmevaluacion t"),
    @NamedQuery(name = "Tarmevaluacion.findByCevaluacion", query = "SELECT t FROM Tarmevaluacion t WHERE t.cevaluacion = :cevaluacion"),
    @NamedQuery(name = "Tarmevaluacion.findByFecha", query = "SELECT t FROM Tarmevaluacion t WHERE t.fecha = :fecha"),
    @NamedQuery(name = "Tarmevaluacion.findByIntento", query = "SELECT t FROM Tarmevaluacion t WHERE t.intento = :intento"),
    @NamedQuery(name = "Tarmevaluacion.findByFechapreox", query = "SELECT t FROM Tarmevaluacion t WHERE t.fechapreox = :fechapreox"),
    @NamedQuery(name = "Tarmevaluacion.findByFechaexpiracion", query = "SELECT t FROM Tarmevaluacion t WHERE t.fechaexpiracion = :fechaexpiracion"),
    @NamedQuery(name = "Tarmevaluacion.findByInformexpath", query = "SELECT t FROM Tarmevaluacion t WHERE t.informexpath = :informexpath"),
    @NamedQuery(name = "Tarmevaluacion.findByPsicologoresponsable", query = "SELECT t FROM Tarmevaluacion t WHERE t.psicologoresponsable = :psicologoresponsable"),
    @NamedQuery(name = "Tarmevaluacion.findByObservacion", query = "SELECT t FROM Tarmevaluacion t WHERE t.observacion = :observacion"),
    @NamedQuery(name = "Tarmevaluacion.findByVigente", query = "SELECT t FROM Tarmevaluacion t WHERE t.vigente = :vigente"),
    @NamedQuery(name = "Tarmevaluacion.findByFregistro", query = "SELECT t FROM Tarmevaluacion t WHERE t.fregistro = :fregistro"),
    @NamedQuery(name = "Tarmevaluacion.findByFechadeposito", query = "SELECT t FROM Tarmevaluacion t WHERE t.fechadeposito = :fechadeposito"),
    @NamedQuery(name = "Tarmevaluacion.findByNopapeleta", query = "SELECT t FROM Tarmevaluacion t WHERE t.nopapeleta = :nopapeleta"),
    @NamedQuery(name = "Tarmevaluacion.findByTipdocpsicologo", query = "SELECT t FROM Tarmevaluacion t WHERE t.tipdocpsicologo = :tipdocpsicologo"),
    @NamedQuery(name = "Tarmevaluacion.findByTipdoccodepsicologo", query = "SELECT t FROM Tarmevaluacion t WHERE t.tipdoccodepsicologo = :tipdoccodepsicologo"),
    @NamedQuery(name = "Tarmevaluacion.findByNumdocpsicologo", query = "SELECT t FROM Tarmevaluacion t WHERE t.numdocpsicologo = :numdocpsicologo")})
public class Tarmevaluacion implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CEVALUACION")
    private String cevaluacion;
    @Column(name = "FECHA")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecha;
    @Column(name = "INTENTO")
    private BigInteger intento;
    @Column(name = "FECHAPREOX")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechapreox;
    @Column(name = "FECHAEXPIRACION")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaexpiracion;
    @Column(name = "INFORMEXPATH")
    private String informexpath;
    @Column(name = "PSICOLOGORESPONSABLE")
    private String psicologoresponsable;
    @Column(name = "OBSERVACION")
    private String observacion;
    @Column(name = "VIGENTE")
    private String vigente;
    @Column(name = "FREGISTRO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fregistro;
    @Column(name = "FECHADEPOSITO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechadeposito;
    @Column(name = "NOPAPELETA")
    private String nopapeleta;
    @Column(name = "TIPDOCPSICOLOGO")
    private String tipdocpsicologo;
    @Column(name = "TIPDOCCODEPSICOLOGO")
    private String tipdoccodepsicologo;
    @Column(name = "NUMDOCPSICOLOGO")
    private String numdocpsicologo;
    @OneToMany(mappedBy = "cevaluacion")
    private Collection<Tarmdetallepreguntas> tarmdetallepreguntasCollection;
    @JoinColumn(name = "EMPRESAPERSONCODE", referencedColumnName = "PERSONCODE")
    @ManyToOne
    private Tcustperson empresapersoncode;
    @JoinColumn(name = "PERSONCODE", referencedColumnName = "PERSONCODE")
    @ManyToOne
    private Tcustperson personcode;
    @JoinColumns({
        @JoinColumn(name = "RESULTADO", referencedColumnName = "CATALOG"),
        @JoinColumn(name = "RESULTADOCODIGO", referencedColumnName = "CATALOGCODE")})
    @ManyToOne
    private Tgenecatalogdetail tgenecatalogdetail;
    @JoinColumns({
        @JoinColumn(name = "CENTROMEDICO", referencedColumnName = "CATALOG"),
        @JoinColumn(name = "CENTROMEDICOCODE", referencedColumnName = "CATALOGCODE")})
    @ManyToOne
    private Tgenecatalogdetail tgenecatalogdetail1;
    @JoinColumns({
        @JoinColumn(name = "TIPOEVALUACION", referencedColumnName = "CATALOG"),
        @JoinColumn(name = "TIPOEVALUACIONCODIGO", referencedColumnName = "CATALOGCODE")})
    @ManyToOne
    private Tgenecatalogdetail tgenecatalogdetail2;

    public Tarmevaluacion() {
    }

    public Tarmevaluacion(String cevaluacion) {
        this.cevaluacion = cevaluacion;
    }

    public String getCevaluacion() {
        return cevaluacion;
    }

    public void setCevaluacion(String cevaluacion) {
        this.cevaluacion = cevaluacion;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    public BigInteger getIntento() {
        return intento;
    }

    public void setIntento(BigInteger intento) {
        this.intento = intento;
    }

    public Date getFechapreox() {
        return fechapreox;
    }

    public void setFechapreox(Date fechapreox) {
        this.fechapreox = fechapreox;
    }

    public Date getFechaexpiracion() {
        return fechaexpiracion;
    }

    public void setFechaexpiracion(Date fechaexpiracion) {
        this.fechaexpiracion = fechaexpiracion;
    }

    public String getInformexpath() {
        return informexpath;
    }

    public void setInformexpath(String informexpath) {
        this.informexpath = informexpath;
    }

    public String getPsicologoresponsable() {
        return psicologoresponsable;
    }

    public void setPsicologoresponsable(String psicologoresponsable) {
        this.psicologoresponsable = psicologoresponsable;
    }

    public String getObservacion() {
        return observacion;
    }

    public void setObservacion(String observacion) {
        this.observacion = observacion;
    }

    public String getVigente() {
        return vigente;
    }

    public void setVigente(String vigente) {
        this.vigente = vigente;
    }

    public Date getFregistro() {
        return fregistro;
    }

    public void setFregistro(Date fregistro) {
        this.fregistro = fregistro;
    }

    public Date getFechadeposito() {
        return fechadeposito;
    }

    public void setFechadeposito(Date fechadeposito) {
        this.fechadeposito = fechadeposito;
    }

    public String getNopapeleta() {
        return nopapeleta;
    }

    public void setNopapeleta(String nopapeleta) {
        this.nopapeleta = nopapeleta;
    }

    public String getTipdocpsicologo() {
        return tipdocpsicologo;
    }

    public void setTipdocpsicologo(String tipdocpsicologo) {
        this.tipdocpsicologo = tipdocpsicologo;
    }

    public String getTipdoccodepsicologo() {
        return tipdoccodepsicologo;
    }

    public void setTipdoccodepsicologo(String tipdoccodepsicologo) {
        this.tipdoccodepsicologo = tipdoccodepsicologo;
    }

    public String getNumdocpsicologo() {
        return numdocpsicologo;
    }

    public void setNumdocpsicologo(String numdocpsicologo) {
        this.numdocpsicologo = numdocpsicologo;
    }

    @XmlTransient
    public Collection<Tarmdetallepreguntas> getTarmdetallepreguntasCollection() {
        return tarmdetallepreguntasCollection;
    }

    public void setTarmdetallepreguntasCollection(Collection<Tarmdetallepreguntas> tarmdetallepreguntasCollection) {
        this.tarmdetallepreguntasCollection = tarmdetallepreguntasCollection;
    }

    public Tcustperson getEmpresapersoncode() {
        return empresapersoncode;
    }

    public void setEmpresapersoncode(Tcustperson empresapersoncode) {
        this.empresapersoncode = empresapersoncode;
    }

    public Tcustperson getPersoncode() {
        return personcode;
    }

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

    public Tgenecatalogdetail getTgenecatalogdetail() {
        return tgenecatalogdetail;
    }

    public void setTgenecatalogdetail(Tgenecatalogdetail tgenecatalogdetail) {
        this.tgenecatalogdetail = tgenecatalogdetail;
    }

    public Tgenecatalogdetail getTgenecatalogdetail1() {
        return tgenecatalogdetail1;
    }

    public void setTgenecatalogdetail1(Tgenecatalogdetail tgenecatalogdetail1) {
        this.tgenecatalogdetail1 = tgenecatalogdetail1;
    }

    public Tgenecatalogdetail getTgenecatalogdetail2() {
        return tgenecatalogdetail2;
    }

    public void setTgenecatalogdetail2(Tgenecatalogdetail tgenecatalogdetail2) {
        this.tgenecatalogdetail2 = tgenecatalogdetail2;
    }

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

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