/*
 * 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.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.TGENETRANSACTIONREPORTS")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tgenetransactionreports.findAll", query = "SELECT t FROM Tgenetransactionreports t"),
    @NamedQuery(name = "Tgenetransactionreports.findByTransactionmodule", query = "SELECT t FROM Tgenetransactionreports t WHERE t.tgenetransactionreportsPK.transactionmodule = :transactionmodule"),
    @NamedQuery(name = "Tgenetransactionreports.findByTransactioncode", query = "SELECT t FROM Tgenetransactionreports t WHERE t.tgenetransactionreportsPK.transactioncode = :transactioncode"),
    @NamedQuery(name = "Tgenetransactionreports.findByTransactionversion", query = "SELECT t FROM Tgenetransactionreports t WHERE t.tgenetransactionreportsPK.transactionversion = :transactionversion"),
    @NamedQuery(name = "Tgenetransactionreports.findBySequence", query = "SELECT t FROM Tgenetransactionreports t WHERE t.tgenetransactionreportsPK.sequence = :sequence"),
    @NamedQuery(name = "Tgenetransactionreports.findByProcesscode", query = "SELECT t FROM Tgenetransactionreports t WHERE t.processcode = :processcode"),
    @NamedQuery(name = "Tgenetransactionreports.findByCatalogtypeprocess", query = "SELECT t FROM Tgenetransactionreports t WHERE t.catalogtypeprocess = :catalogtypeprocess"),
    @NamedQuery(name = "Tgenetransactionreports.findByCatalogcodetypeprocess", query = "SELECT t FROM Tgenetransactionreports t WHERE t.catalogcodetypeprocess = :catalogcodetypeprocess"),
    @NamedQuery(name = "Tgenetransactionreports.findByRecordversion", query = "SELECT t FROM Tgenetransactionreports t WHERE t.recordversion = :recordversion"),
    @NamedQuery(name = "Tgenetransactionreports.findByExecutionorder", query = "SELECT t FROM Tgenetransactionreports t WHERE t.executionorder = :executionorder"),
    @NamedQuery(name = "Tgenetransactionreports.findByStatus", query = "SELECT t FROM Tgenetransactionreports t WHERE t.status = :status"),
    @NamedQuery(name = "Tgenetransactionreports.findByManagecache", query = "SELECT t FROM Tgenetransactionreports t WHERE t.managecache = :managecache")})
public class Tgenetransactionreports implements Serializable {

    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected TgenetransactionreportsPK tgenetransactionreportsPK;
    @Column(name = "PROCESSCODE")
    private String processcode;
    @Column(name = "CATALOGTYPEPROCESS")
    private String catalogtypeprocess;
    @Column(name = "CATALOGCODETYPEPROCESS")
    private String catalogcodetypeprocess;
    @Column(name = "RECORDVERSION")
    private BigInteger recordversion;
    @Column(name = "EXECUTIONORDER")
    private Short executionorder;
    @Column(name = "STATUS")
    private String status;
    @Column(name = "MANAGECACHE")
    private String managecache;
    @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 Tgenetransactionreports() {
    }

    public Tgenetransactionreports(TgenetransactionreportsPK tgenetransactionreportsPK) {
        this.tgenetransactionreportsPK = tgenetransactionreportsPK;
    }

    public Tgenetransactionreports(String transactionmodule, short transactioncode, short transactionversion, short sequence) {
        this.tgenetransactionreportsPK = new TgenetransactionreportsPK(transactionmodule, transactioncode, transactionversion, sequence);
    }

    public TgenetransactionreportsPK getTgenetransactionreportsPK() {
        return tgenetransactionreportsPK;
    }

    public void setTgenetransactionreportsPK(TgenetransactionreportsPK tgenetransactionreportsPK) {
        this.tgenetransactionreportsPK = tgenetransactionreportsPK;
    }

    public String getProcesscode() {
        return processcode;
    }

    public void setProcesscode(String processcode) {
        this.processcode = processcode;
    }

    public String getCatalogtypeprocess() {
        return catalogtypeprocess;
    }

    public void setCatalogtypeprocess(String catalogtypeprocess) {
        this.catalogtypeprocess = catalogtypeprocess;
    }

    public String getCatalogcodetypeprocess() {
        return catalogcodetypeprocess;
    }

    public void setCatalogcodetypeprocess(String catalogcodetypeprocess) {
        this.catalogcodetypeprocess = catalogcodetypeprocess;
    }

    public BigInteger getRecordversion() {
        return recordversion;
    }

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

    public Short getExecutionorder() {
        return executionorder;
    }

    public void setExecutionorder(Short executionorder) {
        this.executionorder = executionorder;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getManagecache() {
        return managecache;
    }

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

    public Tgenetransaction getTgenetransaction() {
        return tgenetransaction;
    }

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

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

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