/*
 * 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 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.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TARMDOCUMENTOHABILITANTEDETALL")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tarmdocumentohabilitantedetall.findAll", query = "SELECT t FROM Tarmdocumentohabilitantedetall t"),
    @NamedQuery(name = "Tarmdocumentohabilitantedetall.findByCodigodetalle", query = "SELECT t FROM Tarmdocumentohabilitantedetall t WHERE t.codigodetalle = :codigodetalle"),
    @NamedQuery(name = "Tarmdocumentohabilitantedetall.findByCarma", query = "SELECT t FROM Tarmdocumentohabilitantedetall t WHERE t.carma = :carma"),
    @NamedQuery(name = "Tarmdocumentohabilitantedetall.findByCodigoarma", query = "SELECT t FROM Tarmdocumentohabilitantedetall t WHERE t.codigoarma = :codigoarma")})
public class Tarmdocumentohabilitantedetall implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CODIGODETALLE")
    private String codigodetalle;
    @Column(name = "CARMA")
    private String carma;
    @Column(name = "CODIGOARMA")
    private String codigoarma;
    @JoinColumn(name = "CDOCUMENTO", referencedColumnName = "CDOCUMENTO")
    @ManyToOne
    private Tarmdocumentohabilitante cdocumento;

    public Tarmdocumentohabilitantedetall() {
    }

    public Tarmdocumentohabilitantedetall(String codigodetalle) {
        this.codigodetalle = codigodetalle;
    }

    public String getCodigodetalle() {
        return codigodetalle;
    }

    public void setCodigodetalle(String codigodetalle) {
        this.codigodetalle = codigodetalle;
    }

    public String getCarma() {
        return carma;
    }

    public void setCarma(String carma) {
        this.carma = carma;
    }

    public String getCodigoarma() {
        return codigoarma;
    }

    public void setCodigoarma(String codigoarma) {
        this.codigoarma = codigoarma;
    }

    public Tarmdocumentohabilitante getCdocumento() {
        return cdocumento;
    }

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

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

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