/*
 * 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.JoinColumn;
import javax.persistence.JoinColumns;
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.TGENETRANSACTIONGLOSARY")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tgenetransactionglosary.findAll", query = "SELECT t FROM Tgenetransactionglosary t"),
    @NamedQuery(name = "Tgenetransactionglosary.findByTransactionmodule", query = "SELECT t FROM Tgenetransactionglosary t WHERE t.tgenetransactionglosaryPK.transactionmodule = :transactionmodule"),
    @NamedQuery(name = "Tgenetransactionglosary.findByTransactioncode", query = "SELECT t FROM Tgenetransactionglosary t WHERE t.tgenetransactionglosaryPK.transactioncode = :transactioncode"),
    @NamedQuery(name = "Tgenetransactionglosary.findByTransactionversion", query = "SELECT t FROM Tgenetransactionglosary t WHERE t.tgenetransactionglosaryPK.transactionversion = :transactionversion"),
    @NamedQuery(name = "Tgenetransactionglosary.findByLanguagecode", query = "SELECT t FROM Tgenetransactionglosary t WHERE t.tgenetransactionglosaryPK.languagecode = :languagecode"),
    @NamedQuery(name = "Tgenetransactionglosary.findBySequence", query = "SELECT t FROM Tgenetransactionglosary t WHERE t.tgenetransactionglosaryPK.sequence = :sequence"),
    @NamedQuery(name = "Tgenetransactionglosary.findByRecordversion", query = "SELECT t FROM Tgenetransactionglosary t WHERE t.recordversion = :recordversion"),
    @NamedQuery(name = "Tgenetransactionglosary.findByDescriptionshort", query = "SELECT t FROM Tgenetransactionglosary t WHERE t.descriptionshort = :descriptionshort"),
    @NamedQuery(name = "Tgenetransactionglosary.findByDescription", query = "SELECT t FROM Tgenetransactionglosary t WHERE t.description = :description")})
public class Tgenetransactionglosary implements Serializable {

    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected TgenetransactionglosaryPK tgenetransactionglosaryPK;
    @Basic(optional = false)
    @Column(name = "RECORDVERSION")
    private BigInteger recordversion;
    @Basic(optional = false)
    @Column(name = "DESCRIPTIONSHORT")
    private String descriptionshort;
    @Basic(optional = false)
    @Column(name = "DESCRIPTION")
    private String description;
    @JoinColumn(name = "LANGUAGECODE", referencedColumnName = "LANGUAGECODE", insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private Tgenelanguage tgenelanguage;
    @JoinColumns({
        @JoinColumn(name = "TRANSACTIONMODULE", referencedColumnName = "TRANSACTIONMODULE", insertable = false, updatable = false),
        @JoinColumn(name = "TRANSACTIONCODE", referencedColumnName = "TRANSACTIONCODE", insertable = false, updatable = false),
        @JoinColumn(name = "TRANSACTIONVERSION", referencedColumnName = "TRANSACTIONVERSION", insertable = false, updatable = false)})
    @ManyToOne(optional = false)
    private Tgenetransaction tgenetransaction;

    public Tgenetransactionglosary() {
    }

    public Tgenetransactionglosary(TgenetransactionglosaryPK tgenetransactionglosaryPK) {
        this.tgenetransactionglosaryPK = tgenetransactionglosaryPK;
    }

    public Tgenetransactionglosary(TgenetransactionglosaryPK tgenetransactionglosaryPK, BigInteger recordversion, String descriptionshort, String description) {
        this.tgenetransactionglosaryPK = tgenetransactionglosaryPK;
        this.recordversion = recordversion;
        this.descriptionshort = descriptionshort;
        this.description = description;
    }

    public Tgenetransactionglosary(String transactionmodule, short transactioncode, short transactionversion, String languagecode, BigInteger sequence) {
        this.tgenetransactionglosaryPK = new TgenetransactionglosaryPK(transactionmodule, transactioncode, transactionversion, languagecode, sequence);
    }

    public TgenetransactionglosaryPK getTgenetransactionglosaryPK() {
        return tgenetransactionglosaryPK;
    }

    public void setTgenetransactionglosaryPK(TgenetransactionglosaryPK tgenetransactionglosaryPK) {
        this.tgenetransactionglosaryPK = tgenetransactionglosaryPK;
    }

    public BigInteger getRecordversion() {
        return recordversion;
    }

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

    public String getDescriptionshort() {
        return descriptionshort;
    }

    public void setDescriptionshort(String descriptionshort) {
        this.descriptionshort = descriptionshort;
    }

    public String getDescription() {
        return description;
    }

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

    public Tgenelanguage getTgenelanguage() {
        return tgenelanguage;
    }

    public void setTgenelanguage(Tgenelanguage tgenelanguage) {
        this.tgenelanguage = tgenelanguage;
    }

    public Tgenetransaction getTgenetransaction() {
        return tgenetransaction;
    }

    public void setTgenetransaction(Tgenetransaction tgenetransaction) {
        this.tgenetransaction = tgenetransaction;
    }

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

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