/*
 * 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.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.TARMDETREPDESTRUIRARMAS")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findAll", query = "SELECT t FROM Tarmdetrepdestruirarmas t"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findByCdetrepdestruirarmas", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.cdetrepdestruirarmas = :cdetrepdestruirarmas"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findByClase", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.clase = :clase"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findByTipo", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.tipo = :tipo"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findByCalibre", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.calibre = :calibre"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findByMarca", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.marca = :marca"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findBySerie", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.serie = :serie"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findByCantidad", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.cantidad = :cantidad"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findByUnidad", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.unidad = :unidad"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findByFdecomiso", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.fdecomiso = :fdecomiso"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findByPropietario", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.propietario = :propietario"),
    @NamedQuery(name = "Tarmdetrepdestruirarmas.findByNrecibo", query = "SELECT t FROM Tarmdetrepdestruirarmas t WHERE t.nrecibo = :nrecibo")})
public class Tarmdetrepdestruirarmas implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CDETREPDESTRUIRARMAS")
    private Long cdetrepdestruirarmas;
    @Column(name = "CLASE")
    private String clase;
    @Column(name = "TIPO")
    private String tipo;
    @Column(name = "CALIBRE")
    private String calibre;
    @Column(name = "MARCA")
    private String marca;
    @Column(name = "SERIE")
    private String serie;
    @Column(name = "CANTIDAD")
    private String cantidad;
    @Column(name = "UNIDAD")
    private String unidad;
    @Column(name = "FDECOMISO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fdecomiso;
    @Column(name = "PROPIETARIO")
    private String propietario;
    @Column(name = "NRECIBO")
    private String nrecibo;
    @JoinColumn(name = "CREPORTE", referencedColumnName = "CREPORTE")
    @ManyToOne(optional = false)
    private Tarmcabrepdestruirarmas creporte;
    @JoinColumn(name = "CDECOMISOARMA", referencedColumnName = "CDECOMISOARMA")
    @ManyToOne(optional = false)
    private Tarmdecomisoarma cdecomisoarma;

    public Tarmdetrepdestruirarmas() {
    }

    public Tarmdetrepdestruirarmas(Long cdetrepdestruirarmas) {
        this.cdetrepdestruirarmas = cdetrepdestruirarmas;
    }

    public Long getCdetrepdestruirarmas() {
        return cdetrepdestruirarmas;
    }

    public void setCdetrepdestruirarmas(Long cdetrepdestruirarmas) {
        this.cdetrepdestruirarmas = cdetrepdestruirarmas;
    }

    public String getClase() {
        return clase;
    }

    public void setClase(String clase) {
        this.clase = clase;
    }

    public String getTipo() {
        return tipo;
    }

    public void setTipo(String tipo) {
        this.tipo = tipo;
    }

    public String getCalibre() {
        return calibre;
    }

    public void setCalibre(String calibre) {
        this.calibre = calibre;
    }

    public String getMarca() {
        return marca;
    }

    public void setMarca(String marca) {
        this.marca = marca;
    }

    public String getSerie() {
        return serie;
    }

    public void setSerie(String serie) {
        this.serie = serie;
    }

    public String getCantidad() {
        return cantidad;
    }

    public void setCantidad(String cantidad) {
        this.cantidad = cantidad;
    }

    public String getUnidad() {
        return unidad;
    }

    public void setUnidad(String unidad) {
        this.unidad = unidad;
    }

    public Date getFdecomiso() {
        return fdecomiso;
    }

    public void setFdecomiso(Date fdecomiso) {
        this.fdecomiso = fdecomiso;
    }

    public String getPropietario() {
        return propietario;
    }

    public void setPropietario(String propietario) {
        this.propietario = propietario;
    }

    public String getNrecibo() {
        return nrecibo;
    }

    public void setNrecibo(String nrecibo) {
        this.nrecibo = nrecibo;
    }

    public Tarmcabrepdestruirarmas getCreporte() {
        return creporte;
    }

    public void setCreporte(Tarmcabrepdestruirarmas creporte) {
        this.creporte = creporte;
    }

    public Tarmdecomisoarma getCdecomisoarma() {
        return cdecomisoarma;
    }

    public void setCdecomisoarma(Tarmdecomisoarma cdecomisoarma) {
        this.cdecomisoarma = cdecomisoarma;
    }

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

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