/*
 * 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.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
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.TARMDECOMISOARMATRANSACCION")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tarmdecomisoarmatransaccion.findAll", query = "SELECT t FROM Tarmdecomisoarmatransaccion t"),
    @NamedQuery(name = "Tarmdecomisoarmatransaccion.findByCdecomisoarmatransaccion", query = "SELECT t FROM Tarmdecomisoarmatransaccion t WHERE t.cdecomisoarmatransaccion = :cdecomisoarmatransaccion"),
    @NamedQuery(name = "Tarmdecomisoarmatransaccion.findByFtransaccion", query = "SELECT t FROM Tarmdecomisoarmatransaccion t WHERE t.ftransaccion = :ftransaccion"),
    @NamedQuery(name = "Tarmdecomisoarmatransaccion.findByFcorte", query = "SELECT t FROM Tarmdecomisoarmatransaccion t WHERE t.fcorte = :fcorte"),
    @NamedQuery(name = "Tarmdecomisoarmatransaccion.findByCcontrol", query = "SELECT t FROM Tarmdecomisoarmatransaccion t WHERE t.ccontrol = :ccontrol"),
    @NamedQuery(name = "Tarmdecomisoarmatransaccion.findByNumerotransaccion", query = "SELECT t FROM Tarmdecomisoarmatransaccion t WHERE t.numerotransaccion = :numerotransaccion"),
    @NamedQuery(name = "Tarmdecomisoarmatransaccion.findByXpath", query = "SELECT t FROM Tarmdecomisoarmatransaccion t WHERE t.xpath = :xpath"),
    @NamedQuery(name = "Tarmdecomisoarmatransaccion.findByEstadoflujo", query = "SELECT t FROM Tarmdecomisoarmatransaccion t WHERE t.estadoflujo = :estadoflujo"),
    @NamedQuery(name = "Tarmdecomisoarmatransaccion.findByEstadofirma", query = "SELECT t FROM Tarmdecomisoarmatransaccion t WHERE t.estadofirma = :estadofirma")})
public class Tarmdecomisoarmatransaccion implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CDECOMISOARMATRANSACCION")
    private Long cdecomisoarmatransaccion;
    @Basic(optional = false)
    @Column(name = "FTRANSACCION")
    @Temporal(TemporalType.TIMESTAMP)
    private Date ftransaccion;
    @Basic(optional = false)
    @Column(name = "FCORTE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fcorte;
    @Basic(optional = false)
    @Column(name = "CCONTROL")
    private String ccontrol;
    @Column(name = "NUMEROTRANSACCION")
    private String numerotransaccion;
    @Column(name = "XPATH")
    private String xpath;
    @Column(name = "ESTADOFLUJO")
    private String estadoflujo;
    @Column(name = "ESTADOFIRMA")
    private String estadofirma;
    @OneToMany(mappedBy = "cdecomisoarmatransaccion")
    private Collection<Tarmtransaccionarmabodega> tarmtransaccionarmabodegaCollection;
    @OneToMany(mappedBy = "cdecomisoarmatransaccion")
    private Collection<Tarmdecomisoarma> tarmdecomisoarmaCollection;

    public Tarmdecomisoarmatransaccion() {
    }

    public Tarmdecomisoarmatransaccion(Long cdecomisoarmatransaccion) {
        this.cdecomisoarmatransaccion = cdecomisoarmatransaccion;
    }

    public Tarmdecomisoarmatransaccion(Long cdecomisoarmatransaccion, Date ftransaccion, Date fcorte, String ccontrol) {
        this.cdecomisoarmatransaccion = cdecomisoarmatransaccion;
        this.ftransaccion = ftransaccion;
        this.fcorte = fcorte;
        this.ccontrol = ccontrol;
    }

    public Long getCdecomisoarmatransaccion() {
        return cdecomisoarmatransaccion;
    }

    public void setCdecomisoarmatransaccion(Long cdecomisoarmatransaccion) {
        this.cdecomisoarmatransaccion = cdecomisoarmatransaccion;
    }

    public Date getFtransaccion() {
        return ftransaccion;
    }

    public void setFtransaccion(Date ftransaccion) {
        this.ftransaccion = ftransaccion;
    }

    public Date getFcorte() {
        return fcorte;
    }

    public void setFcorte(Date fcorte) {
        this.fcorte = fcorte;
    }

    public String getCcontrol() {
        return ccontrol;
    }

    public void setCcontrol(String ccontrol) {
        this.ccontrol = ccontrol;
    }

    public String getNumerotransaccion() {
        return numerotransaccion;
    }

    public void setNumerotransaccion(String numerotransaccion) {
        this.numerotransaccion = numerotransaccion;
    }

    public String getXpath() {
        return xpath;
    }

    public void setXpath(String xpath) {
        this.xpath = xpath;
    }

    public String getEstadoflujo() {
        return estadoflujo;
    }

    public void setEstadoflujo(String estadoflujo) {
        this.estadoflujo = estadoflujo;
    }

    public String getEstadofirma() {
        return estadofirma;
    }

    public void setEstadofirma(String estadofirma) {
        this.estadofirma = estadofirma;
    }

    @XmlTransient
    public Collection<Tarmtransaccionarmabodega> getTarmtransaccionarmabodegaCollection() {
        return tarmtransaccionarmabodegaCollection;
    }

    public void setTarmtransaccionarmabodegaCollection(Collection<Tarmtransaccionarmabodega> tarmtransaccionarmabodegaCollection) {
        this.tarmtransaccionarmabodegaCollection = tarmtransaccionarmabodegaCollection;
    }

    @XmlTransient
    public Collection<Tarmdecomisoarma> getTarmdecomisoarmaCollection() {
        return tarmdecomisoarmaCollection;
    }

    public void setTarmdecomisoarmaCollection(Collection<Tarmdecomisoarma> tarmdecomisoarmaCollection) {
        this.tarmdecomisoarmaCollection = tarmdecomisoarmaCollection;
    }

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

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