/*
 * 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.TGENETRANSACTIONPAGES")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tgenetransactionpages.findAll", query = "SELECT t FROM Tgenetransactionpages t"),
    @NamedQuery(name = "Tgenetransactionpages.findByTransactionmodule", query = "SELECT t FROM Tgenetransactionpages t WHERE t.tgenetransactionpagesPK.transactionmodule = :transactionmodule"),
    @NamedQuery(name = "Tgenetransactionpages.findByTransactioncode", query = "SELECT t FROM Tgenetransactionpages t WHERE t.tgenetransactionpagesPK.transactioncode = :transactioncode"),
    @NamedQuery(name = "Tgenetransactionpages.findByTransactionversion", query = "SELECT t FROM Tgenetransactionpages t WHERE t.tgenetransactionpagesPK.transactionversion = :transactionversion"),
    @NamedQuery(name = "Tgenetransactionpages.findBySequence", query = "SELECT t FROM Tgenetransactionpages t WHERE t.tgenetransactionpagesPK.sequence = :sequence"),
    @NamedQuery(name = "Tgenetransactionpages.findByRecordversion", query = "SELECT t FROM Tgenetransactionpages t WHERE t.recordversion = :recordversion"),
    @NamedQuery(name = "Tgenetransactionpages.findByPresentationorder", query = "SELECT t FROM Tgenetransactionpages t WHERE t.presentationorder = :presentationorder"),
    @NamedQuery(name = "Tgenetransactionpages.findByPage", query = "SELECT t FROM Tgenetransactionpages t WHERE t.page = :page"),
    @NamedQuery(name = "Tgenetransactionpages.findByTitle", query = "SELECT t FROM Tgenetransactionpages t WHERE t.title = :title"),
    @NamedQuery(name = "Tgenetransactionpages.findByQueryfunction", query = "SELECT t FROM Tgenetransactionpages t WHERE t.queryfunction = :queryfunction"),
    @NamedQuery(name = "Tgenetransactionpages.findBySavefunction", query = "SELECT t FROM Tgenetransactionpages t WHERE t.savefunction = :savefunction"),
    @NamedQuery(name = "Tgenetransactionpages.findByActive", query = "SELECT t FROM Tgenetransactionpages t WHERE t.active = :active"),
    @NamedQuery(name = "Tgenetransactionpages.findByAutodownload", query = "SELECT t FROM Tgenetransactionpages t WHERE t.autodownload = :autodownload"),
    @NamedQuery(name = "Tgenetransactionpages.findByPagejsf", query = "SELECT t FROM Tgenetransactionpages t WHERE t.pagejsf = :pagejsf"),
    @NamedQuery(name = "Tgenetransactionpages.findByDescription", query = "SELECT t FROM Tgenetransactionpages t WHERE t.description = :description"),
    @NamedQuery(name = "Tgenetransactionpages.findByController", query = "SELECT t FROM Tgenetransactionpages t WHERE t.controller = :controller")})
public class Tgenetransactionpages implements Serializable {

    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected TgenetransactionpagesPK tgenetransactionpagesPK;
    @Column(name = "RECORDVERSION")
    private BigInteger recordversion;
    @Column(name = "PRESENTATIONORDER")
    private Short presentationorder;
    @Column(name = "PAGE")
    private String page;
    @Column(name = "TITLE")
    private String title;
    @Column(name = "QUERYFUNCTION")
    private String queryfunction;
    @Column(name = "SAVEFUNCTION")
    private String savefunction;
    @Column(name = "ACTIVE")
    private String active;
    @Column(name = "AUTODOWNLOAD")
    private String autodownload;
    @Column(name = "PAGEJSF")
    private String pagejsf;
    @Column(name = "DESCRIPTION")
    private String description;
    @Column(name = "CONTROLLER")
    private String controller;
    @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 Tgenetransactionpages() {
    }

    public Tgenetransactionpages(TgenetransactionpagesPK tgenetransactionpagesPK) {
        this.tgenetransactionpagesPK = tgenetransactionpagesPK;
    }

    public Tgenetransactionpages(String transactionmodule, short transactioncode, short transactionversion, short sequence) {
        this.tgenetransactionpagesPK = new TgenetransactionpagesPK(transactionmodule, transactioncode, transactionversion, sequence);
    }

    public TgenetransactionpagesPK getTgenetransactionpagesPK() {
        return tgenetransactionpagesPK;
    }

    public void setTgenetransactionpagesPK(TgenetransactionpagesPK tgenetransactionpagesPK) {
        this.tgenetransactionpagesPK = tgenetransactionpagesPK;
    }

    public BigInteger getRecordversion() {
        return recordversion;
    }

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

    public Short getPresentationorder() {
        return presentationorder;
    }

    public void setPresentationorder(Short presentationorder) {
        this.presentationorder = presentationorder;
    }

    public String getPage() {
        return page;
    }

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

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getQueryfunction() {
        return queryfunction;
    }

    public void setQueryfunction(String queryfunction) {
        this.queryfunction = queryfunction;
    }

    public String getSavefunction() {
        return savefunction;
    }

    public void setSavefunction(String savefunction) {
        this.savefunction = savefunction;
    }

    public String getActive() {
        return active;
    }

    public void setActive(String active) {
        this.active = active;
    }

    public String getAutodownload() {
        return autodownload;
    }

    public void setAutodownload(String autodownload) {
        this.autodownload = autodownload;
    }

    public String getPagejsf() {
        return pagejsf;
    }

    public void setPagejsf(String pagejsf) {
        this.pagejsf = pagejsf;
    }

    public String getDescription() {
        return description;
    }

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

    public String getController() {
        return controller;
    }

    public void setController(String controller) {
        this.controller = controller;
    }

    public Tgenetransaction getTgenetransaction() {
        return tgenetransaction;
    }

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

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

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