/*
 * 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 java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TGENETRANSACTION")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tgenetransaction.findAll", query = "SELECT t FROM Tgenetransaction t"),
    @NamedQuery(name = "Tgenetransaction.findByTransactionmodule", query = "SELECT t FROM Tgenetransaction t WHERE t.tgenetransactionPK.transactionmodule = :transactionmodule"),
    @NamedQuery(name = "Tgenetransaction.findByTransactioncode", query = "SELECT t FROM Tgenetransaction t WHERE t.tgenetransactionPK.transactioncode = :transactioncode"),
    @NamedQuery(name = "Tgenetransaction.findByTransactionversion", query = "SELECT t FROM Tgenetransaction t WHERE t.tgenetransactionPK.transactionversion = :transactionversion"),
    @NamedQuery(name = "Tgenetransaction.findByRecordversion", query = "SELECT t FROM Tgenetransaction t WHERE t.recordversion = :recordversion"),
    @NamedQuery(name = "Tgenetransaction.findByName", query = "SELECT t FROM Tgenetransaction t WHERE t.name = :name"),
    @NamedQuery(name = "Tgenetransaction.findByPage", query = "SELECT t FROM Tgenetransaction t WHERE t.page = :page"),
    @NamedQuery(name = "Tgenetransaction.findByAutoquery", query = "SELECT t FROM Tgenetransaction t WHERE t.autoquery = :autoquery"),
    @NamedQuery(name = "Tgenetransaction.findByInternal", query = "SELECT t FROM Tgenetransaction t WHERE t.internal = :internal"),
    @NamedQuery(name = "Tgenetransaction.findByImmobilization", query = "SELECT t FROM Tgenetransaction t WHERE t.immobilization = :immobilization"),
    @NamedQuery(name = "Tgenetransaction.findByCompletetariffitems", query = "SELECT t FROM Tgenetransaction t WHERE t.completetariffitems = :completetariffitems"),
    @NamedQuery(name = "Tgenetransaction.findByFinancialprocess", query = "SELECT t FROM Tgenetransaction t WHERE t.financialprocess = :financialprocess"),
    @NamedQuery(name = "Tgenetransaction.findByManagecache", query = "SELECT t FROM Tgenetransaction t WHERE t.managecache = :managecache"),
    @NamedQuery(name = "Tgenetransaction.findBySignature", query = "SELECT t FROM Tgenetransaction t WHERE t.signature = :signature"),
    @NamedQuery(name = "Tgenetransaction.findByInbox", query = "SELECT t FROM Tgenetransaction t WHERE t.inbox = :inbox"),
    @NamedQuery(name = "Tgenetransaction.findByMessagecode", query = "SELECT t FROM Tgenetransaction t WHERE t.messagecode = :messagecode"),
    @NamedQuery(name = "Tgenetransaction.findByQueryagain", query = "SELECT t FROM Tgenetransaction t WHERE t.queryagain = :queryagain"),
    @NamedQuery(name = "Tgenetransaction.findByQuerycode", query = "SELECT t FROM Tgenetransaction t WHERE t.querycode = :querycode"),
    @NamedQuery(name = "Tgenetransaction.findByBranchamong", query = "SELECT t FROM Tgenetransaction t WHERE t.branchamong = :branchamong"),
    @NamedQuery(name = "Tgenetransaction.findByJsfpage", query = "SELECT t FROM Tgenetransaction t WHERE t.jsfpage = :jsfpage")})
public class Tgenetransaction implements Serializable {

    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected TgenetransactionPK tgenetransactionPK;
    @Column(name = "RECORDVERSION")
    private BigInteger recordversion;
    @Column(name = "NAME")
    private String name;
    @Column(name = "PAGE")
    private String page;
    @Column(name = "AUTOQUERY")
    private String autoquery;
    @Column(name = "INTERNAL")
    private String internal;
    @Column(name = "IMMOBILIZATION")
    private String immobilization;
    @Column(name = "COMPLETETARIFFITEMS")
    private String completetariffitems;
    @Column(name = "FINANCIALPROCESS")
    private String financialprocess;
    @Column(name = "MANAGECACHE")
    private String managecache;
    @Column(name = "SIGNATURE")
    private String signature;
    @Column(name = "INBOX")
    private String inbox;
    @Column(name = "MESSAGECODE")
    private Short messagecode;
    @Column(name = "QUERYAGAIN")
    private String queryagain;
    @Column(name = "QUERYCODE")
    private String querycode;
    @Column(name = "BRANCHAMONG")
    private String branchamong;
    @Column(name = "JSFPAGE")
    private String jsfpage;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tbpmfieldtransactionorigin> tbpmfieldtransactionoriginCollection;
    @OneToMany(mappedBy = "tgenetransaction")
    private Collection<Tgenescheduleprocess> tgenescheduleprocessCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tgenemenusubleveltran> tgenemenusubleveltranCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tsafeprofilehorary> tsafeprofilehoraryCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tgenetransactionreportlink> tgenetransactionreportlinkCollection;
    @JoinColumn(name = "TRANSACTIONMODULE", referencedColumnName = "MODULECODE", insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private Tgenemodule tgenemodule;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tgenetransactionquery> tgenetransactionqueryCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tgenetransactionreports> tgenetransactionreportsCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tgenebatch> tgenebatchCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tgenetransactionprocess> tgenetransactionprocessCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tgenetransactiondesc> tgenetransactiondescCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tbpmfieldtransactionmaping> tbpmfieldtransactionmapingCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tgenetransactionglosary> tgenetransactionglosaryCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tgenetransactionpages> tgenetransactionpagesCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenetransaction")
    private Collection<Tgenemenuleveltran> tgenemenuleveltranCollection;

    public Tgenetransaction() {
    }

    public Tgenetransaction(TgenetransactionPK tgenetransactionPK) {
        this.tgenetransactionPK = tgenetransactionPK;
    }

    public Tgenetransaction(String transactionmodule, short transactioncode, short transactionversion) {
        this.tgenetransactionPK = new TgenetransactionPK(transactionmodule, transactioncode, transactionversion);
    }

    public TgenetransactionPK getTgenetransactionPK() {
        return tgenetransactionPK;
    }

    public void setTgenetransactionPK(TgenetransactionPK tgenetransactionPK) {
        this.tgenetransactionPK = tgenetransactionPK;
    }

    public BigInteger getRecordversion() {
        return recordversion;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPage() {
        return page;
    }

    public void setPage(String page) {
        this.page = page;
    }

    public String getAutoquery() {
        return autoquery;
    }

    public void setAutoquery(String autoquery) {
        this.autoquery = autoquery;
    }

    public String getInternal() {
        return internal;
    }

    public void setInternal(String internal) {
        this.internal = internal;
    }

    public String getImmobilization() {
        return immobilization;
    }

    public void setImmobilization(String immobilization) {
        this.immobilization = immobilization;
    }

    public String getCompletetariffitems() {
        return completetariffitems;
    }

    public void setCompletetariffitems(String completetariffitems) {
        this.completetariffitems = completetariffitems;
    }

    public String getFinancialprocess() {
        return financialprocess;
    }

    public void setFinancialprocess(String financialprocess) {
        this.financialprocess = financialprocess;
    }

    public String getManagecache() {
        return managecache;
    }

    public void setManagecache(String managecache) {
        this.managecache = managecache;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getInbox() {
        return inbox;
    }

    public void setInbox(String inbox) {
        this.inbox = inbox;
    }

    public Short getMessagecode() {
        return messagecode;
    }

    public void setMessagecode(Short messagecode) {
        this.messagecode = messagecode;
    }

    public String getQueryagain() {
        return queryagain;
    }

    public void setQueryagain(String queryagain) {
        this.queryagain = queryagain;
    }

    public String getQuerycode() {
        return querycode;
    }

    public void setQuerycode(String querycode) {
        this.querycode = querycode;
    }

    public String getBranchamong() {
        return branchamong;
    }

    public void setBranchamong(String branchamong) {
        this.branchamong = branchamong;
    }

    public String getJsfpage() {
        return jsfpage;
    }

    public void setJsfpage(String jsfpage) {
        this.jsfpage = jsfpage;
    }

    @XmlTransient
    public Collection<Tbpmfieldtransactionorigin> getTbpmfieldtransactionoriginCollection() {
        return tbpmfieldtransactionoriginCollection;
    }

    public void setTbpmfieldtransactionoriginCollection(Collection<Tbpmfieldtransactionorigin> tbpmfieldtransactionoriginCollection) {
        this.tbpmfieldtransactionoriginCollection = tbpmfieldtransactionoriginCollection;
    }

    @XmlTransient
    public Collection<Tgenescheduleprocess> getTgenescheduleprocessCollection() {
        return tgenescheduleprocessCollection;
    }

    public void setTgenescheduleprocessCollection(Collection<Tgenescheduleprocess> tgenescheduleprocessCollection) {
        this.tgenescheduleprocessCollection = tgenescheduleprocessCollection;
    }

    @XmlTransient
    public Collection<Tgenemenusubleveltran> getTgenemenusubleveltranCollection() {
        return tgenemenusubleveltranCollection;
    }

    public void setTgenemenusubleveltranCollection(Collection<Tgenemenusubleveltran> tgenemenusubleveltranCollection) {
        this.tgenemenusubleveltranCollection = tgenemenusubleveltranCollection;
    }

    @XmlTransient
    public Collection<Tsafeprofilehorary> getTsafeprofilehoraryCollection() {
        return tsafeprofilehoraryCollection;
    }

    public void setTsafeprofilehoraryCollection(Collection<Tsafeprofilehorary> tsafeprofilehoraryCollection) {
        this.tsafeprofilehoraryCollection = tsafeprofilehoraryCollection;
    }

    @XmlTransient
    public Collection<Tgenetransactionreportlink> getTgenetransactionreportlinkCollection() {
        return tgenetransactionreportlinkCollection;
    }

    public void setTgenetransactionreportlinkCollection(Collection<Tgenetransactionreportlink> tgenetransactionreportlinkCollection) {
        this.tgenetransactionreportlinkCollection = tgenetransactionreportlinkCollection;
    }

    public Tgenemodule getTgenemodule() {
        return tgenemodule;
    }

    public void setTgenemodule(Tgenemodule tgenemodule) {
        this.tgenemodule = tgenemodule;
    }

    @XmlTransient
    public Collection<Tgenetransactionquery> getTgenetransactionqueryCollection() {
        return tgenetransactionqueryCollection;
    }

    public void setTgenetransactionqueryCollection(Collection<Tgenetransactionquery> tgenetransactionqueryCollection) {
        this.tgenetransactionqueryCollection = tgenetransactionqueryCollection;
    }

    @XmlTransient
    public Collection<Tgenetransactionreports> getTgenetransactionreportsCollection() {
        return tgenetransactionreportsCollection;
    }

    public void setTgenetransactionreportsCollection(Collection<Tgenetransactionreports> tgenetransactionreportsCollection) {
        this.tgenetransactionreportsCollection = tgenetransactionreportsCollection;
    }

    @XmlTransient
    public Collection<Tgenebatch> getTgenebatchCollection() {
        return tgenebatchCollection;
    }

    public void setTgenebatchCollection(Collection<Tgenebatch> tgenebatchCollection) {
        this.tgenebatchCollection = tgenebatchCollection;
    }

    @XmlTransient
    public Collection<Tgenetransactionprocess> getTgenetransactionprocessCollection() {
        return tgenetransactionprocessCollection;
    }

    public void setTgenetransactionprocessCollection(Collection<Tgenetransactionprocess> tgenetransactionprocessCollection) {
        this.tgenetransactionprocessCollection = tgenetransactionprocessCollection;
    }

    @XmlTransient
    public Collection<Tgenetransactiondesc> getTgenetransactiondescCollection() {
        return tgenetransactiondescCollection;
    }

    public void setTgenetransactiondescCollection(Collection<Tgenetransactiondesc> tgenetransactiondescCollection) {
        this.tgenetransactiondescCollection = tgenetransactiondescCollection;
    }

    @XmlTransient
    public Collection<Tbpmfieldtransactionmaping> getTbpmfieldtransactionmapingCollection() {
        return tbpmfieldtransactionmapingCollection;
    }

    public void setTbpmfieldtransactionmapingCollection(Collection<Tbpmfieldtransactionmaping> tbpmfieldtransactionmapingCollection) {
        this.tbpmfieldtransactionmapingCollection = tbpmfieldtransactionmapingCollection;
    }

    @XmlTransient
    public Collection<Tgenetransactionglosary> getTgenetransactionglosaryCollection() {
        return tgenetransactionglosaryCollection;
    }

    public void setTgenetransactionglosaryCollection(Collection<Tgenetransactionglosary> tgenetransactionglosaryCollection) {
        this.tgenetransactionglosaryCollection = tgenetransactionglosaryCollection;
    }

    @XmlTransient
    public Collection<Tgenetransactionpages> getTgenetransactionpagesCollection() {
        return tgenetransactionpagesCollection;
    }

    public void setTgenetransactionpagesCollection(Collection<Tgenetransactionpages> tgenetransactionpagesCollection) {
        this.tgenetransactionpagesCollection = tgenetransactionpagesCollection;
    }

    @XmlTransient
    public Collection<Tgenemenuleveltran> getTgenemenuleveltranCollection() {
        return tgenemenuleveltranCollection;
    }

    public void setTgenemenuleveltranCollection(Collection<Tgenemenuleveltran> tgenemenuleveltranCollection) {
        this.tgenemenuleveltranCollection = tgenemenuleveltranCollection;
    }

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

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