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

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TARMCOLADEIMPRESION")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tarmcoladeimpresion.findAll", query = "SELECT t FROM Tarmcoladeimpresion t"),
    @NamedQuery(name = "Tarmcoladeimpresion.findByCimpresion", query = "SELECT t FROM Tarmcoladeimpresion t WHERE t.cimpresion = :cimpresion"),
    @NamedQuery(name = "Tarmcoladeimpresion.findByFechaimpresion", query = "SELECT t FROM Tarmcoladeimpresion t WHERE t.fechaimpresion = :fechaimpresion"),
    @NamedQuery(name = "Tarmcoladeimpresion.findByFecharegistro", query = "SELECT t FROM Tarmcoladeimpresion t WHERE t.fecharegistro = :fecharegistro"),
    @NamedQuery(name = "Tarmcoladeimpresion.findByCodigotarjeta", query = "SELECT t FROM Tarmcoladeimpresion t WHERE t.codigotarjeta = :codigotarjeta")})
public class Tarmcoladeimpresion implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CIMPRESION")
    private String cimpresion;
    @Column(name = "FECHAIMPRESION")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaimpresion;
    @Column(name = "FECHAREGISTRO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecharegistro;
    @Column(name = "CODIGOTARJETA")
    private String codigotarjeta;
    @JoinColumn(name = "CDOCUMENTO", referencedColumnName = "CDOCUMENTO")
    @ManyToOne
    private Tarmdocumentohabilitante cdocumento;
    @JoinColumns({
        @JoinColumn(name = "ESTADOIMPRESION", referencedColumnName = "CATALOG"),
        @JoinColumn(name = "ESTADOIMPRESIONCODE", referencedColumnName = "CATALOGCODE")})
    @ManyToOne
    private Tgenecatalogdetail tgenecatalogdetail;

    public Tarmcoladeimpresion() {
    }

    public Tarmcoladeimpresion(String cimpresion) {
        this.cimpresion = cimpresion;
    }

    public String getCimpresion() {
        return cimpresion;
    }

    public void setCimpresion(String cimpresion) {
        this.cimpresion = cimpresion;
    }

    public Date getFechaimpresion() {
        return fechaimpresion;
    }

    public void setFechaimpresion(Date fechaimpresion) {
        this.fechaimpresion = fechaimpresion;
    }

    public Date getFecharegistro() {
        return fecharegistro;
    }

    public void setFecharegistro(Date fecharegistro) {
        this.fecharegistro = fecharegistro;
    }

    public String getCodigotarjeta() {
        return codigotarjeta;
    }

    public void setCodigotarjeta(String codigotarjeta) {
        this.codigotarjeta = codigotarjeta;
    }

    public Tarmdocumentohabilitante getCdocumento() {
        return cdocumento;
    }

    public void setCdocumento(Tarmdocumentohabilitante cdocumento) {
        this.cdocumento = cdocumento;
    }

    public Tgenecatalogdetail getTgenecatalogdetail() {
        return tgenecatalogdetail;
    }

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

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

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