/*
 * 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.CascadeType;
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.TARMCABREPDESTRUIRARMAS")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tarmcabrepdestruirarmas.findAll", query = "SELECT t FROM Tarmcabrepdestruirarmas t"),
    @NamedQuery(name = "Tarmcabrepdestruirarmas.findByCreporte", query = "SELECT t FROM Tarmcabrepdestruirarmas t WHERE t.creporte = :creporte"),
    @NamedQuery(name = "Tarmcabrepdestruirarmas.findByFreporte", query = "SELECT t FROM Tarmcabrepdestruirarmas t WHERE t.freporte = :freporte"),
    @NamedQuery(name = "Tarmcabrepdestruirarmas.findByObsjefedpto", query = "SELECT t FROM Tarmcabrepdestruirarmas t WHERE t.obsjefedpto = :obsjefedpto"),
    @NamedQuery(name = "Tarmcabrepdestruirarmas.findByObsjefecc", query = "SELECT t FROM Tarmcabrepdestruirarmas t WHERE t.obsjefecc = :obsjefecc"),
    @NamedQuery(name = "Tarmcabrepdestruirarmas.findByXpath", query = "SELECT t FROM Tarmcabrepdestruirarmas t WHERE t.xpath = :xpath")})
public class Tarmcabrepdestruirarmas implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CREPORTE")
    private Long creporte;
    @Column(name = "FREPORTE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date freporte;
    @Column(name = "OBSJEFEDPTO")
    private String obsjefedpto;
    @Column(name = "OBSJEFECC")
    private String obsjefecc;
    @Column(name = "XPATH")
    private String xpath;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "creporte")
    private Collection<Tarmdetrepdestruirarmas> tarmdetrepdestruirarmasCollection;

    public Tarmcabrepdestruirarmas() {
    }

    public Tarmcabrepdestruirarmas(Long creporte) {
        this.creporte = creporte;
    }

    public Long getCreporte() {
        return creporte;
    }

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

    public Date getFreporte() {
        return freporte;
    }

    public void setFreporte(Date freporte) {
        this.freporte = freporte;
    }

    public String getObsjefedpto() {
        return obsjefedpto;
    }

    public void setObsjefedpto(String obsjefedpto) {
        this.obsjefedpto = obsjefedpto;
    }

    public String getObsjefecc() {
        return obsjefecc;
    }

    public void setObsjefecc(String obsjefecc) {
        this.obsjefecc = obsjefecc;
    }

    public String getXpath() {
        return xpath;
    }

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

    @XmlTransient
    public Collection<Tarmdetrepdestruirarmas> getTarmdetrepdestruirarmasCollection() {
        return tarmdetrepdestruirarmasCollection;
    }

    public void setTarmdetrepdestruirarmasCollection(Collection<Tarmdetrepdestruirarmas> tarmdetrepdestruirarmasCollection) {
        this.tarmdetrepdestruirarmasCollection = tarmdetrepdestruirarmasCollection;
    }

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

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