/*
 * 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.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TGENECATALOGDETAILTEST")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tgenecatalogdetailtest.findAll", query = "SELECT t FROM Tgenecatalogdetailtest t"),
    @NamedQuery(name = "Tgenecatalogdetailtest.findByCatalog", query = "SELECT t FROM Tgenecatalogdetailtest t WHERE t.tgenecatalogdetailtestPK.catalog = :catalog"),
    @NamedQuery(name = "Tgenecatalogdetailtest.findByCatalogcode", query = "SELECT t FROM Tgenecatalogdetailtest t WHERE t.tgenecatalogdetailtestPK.catalogcode = :catalogcode"),
    @NamedQuery(name = "Tgenecatalogdetailtest.findByRecordversion", query = "SELECT t FROM Tgenecatalogdetailtest t WHERE t.recordversion = :recordversion"),
    @NamedQuery(name = "Tgenecatalogdetailtest.findByDescription", query = "SELECT t FROM Tgenecatalogdetailtest t WHERE t.description = :description"),
    @NamedQuery(name = "Tgenecatalogdetailtest.findByLegalcode", query = "SELECT t FROM Tgenecatalogdetailtest t WHERE t.legalcode = :legalcode"),
    @NamedQuery(name = "Tgenecatalogdetailtest.findByIdalfresco", query = "SELECT t FROM Tgenecatalogdetailtest t WHERE t.idalfresco = :idalfresco")})
public class Tgenecatalogdetailtest implements Serializable {

    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected TgenecatalogdetailtestPK tgenecatalogdetailtestPK;
    @Column(name = "RECORDVERSION")
    private BigInteger recordversion;
    @Basic(optional = false)
    @Column(name = "DESCRIPTION")
    private String description;
    @Column(name = "LEGALCODE")
    private String legalcode;
    @Column(name = "IDALFRESCO")
    private String idalfresco;

    public Tgenecatalogdetailtest() {
    }

    public Tgenecatalogdetailtest(TgenecatalogdetailtestPK tgenecatalogdetailtestPK) {
        this.tgenecatalogdetailtestPK = tgenecatalogdetailtestPK;
    }

    public Tgenecatalogdetailtest(TgenecatalogdetailtestPK tgenecatalogdetailtestPK, String description) {
        this.tgenecatalogdetailtestPK = tgenecatalogdetailtestPK;
        this.description = description;
    }

    public Tgenecatalogdetailtest(String catalog, String catalogcode) {
        this.tgenecatalogdetailtestPK = new TgenecatalogdetailtestPK(catalog, catalogcode);
    }

    public TgenecatalogdetailtestPK getTgenecatalogdetailtestPK() {
        return tgenecatalogdetailtestPK;
    }

    public void setTgenecatalogdetailtestPK(TgenecatalogdetailtestPK tgenecatalogdetailtestPK) {
        this.tgenecatalogdetailtestPK = tgenecatalogdetailtestPK;
    }

    public BigInteger getRecordversion() {
        return recordversion;
    }

    public void setRecordversion(BigInteger recordversion) {
        this.recordversion = recordversion;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getLegalcode() {
        return legalcode;
    }

    public void setLegalcode(String legalcode) {
        this.legalcode = legalcode;
    }

    public String getIdalfresco() {
        return idalfresco;
    }

    public void setIdalfresco(String idalfresco) {
        this.idalfresco = idalfresco;
    }

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

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