/*
 * 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.util.Date;
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.TSAFEAUDIT")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tsafeaudit.findAll", query = "SELECT t FROM Tsafeaudit t"),
    @NamedQuery(name = "Tsafeaudit.findByChangedate", query = "SELECT t FROM Tsafeaudit t WHERE t.tsafeauditPK.changedate = :changedate"),
    @NamedQuery(name = "Tsafeaudit.findByTablename", query = "SELECT t FROM Tsafeaudit t WHERE t.tsafeauditPK.tablename = :tablename"),
    @NamedQuery(name = "Tsafeaudit.findByColumnname", query = "SELECT t FROM Tsafeaudit t WHERE t.tsafeauditPK.columnname = :columnname"),
    @NamedQuery(name = "Tsafeaudit.findByPartitiondb", query = "SELECT t FROM Tsafeaudit t WHERE t.tsafeauditPK.partitiondb = :partitiondb"),
    @NamedQuery(name = "Tsafeaudit.findByRealdate", query = "SELECT t FROM Tsafeaudit t WHERE t.tsafeauditPK.realdate = :realdate"),
    @NamedQuery(name = "Tsafeaudit.findByCompanycode", query = "SELECT t FROM Tsafeaudit t WHERE t.companycode = :companycode"),
    @NamedQuery(name = "Tsafeaudit.findByOfficecode", query = "SELECT t FROM Tsafeaudit t WHERE t.officecode = :officecode"),
    @NamedQuery(name = "Tsafeaudit.findByBranchcode", query = "SELECT t FROM Tsafeaudit t WHERE t.branchcode = :branchcode"),
    @NamedQuery(name = "Tsafeaudit.findByTerminalcode", query = "SELECT t FROM Tsafeaudit t WHERE t.terminalcode = :terminalcode"),
    @NamedQuery(name = "Tsafeaudit.findByUsercode", query = "SELECT t FROM Tsafeaudit t WHERE t.usercode = :usercode"),
    @NamedQuery(name = "Tsafeaudit.findByTransactionmodule", query = "SELECT t FROM Tsafeaudit t WHERE t.transactionmodule = :transactionmodule"),
    @NamedQuery(name = "Tsafeaudit.findByTransactioncode", query = "SELECT t FROM Tsafeaudit t WHERE t.transactioncode = :transactioncode"),
    @NamedQuery(name = "Tsafeaudit.findByTransactionversion", query = "SELECT t FROM Tsafeaudit t WHERE t.transactionversion = :transactionversion"),
    @NamedQuery(name = "Tsafeaudit.findByOldvalue", query = "SELECT t FROM Tsafeaudit t WHERE t.oldvalue = :oldvalue"),
    @NamedQuery(name = "Tsafeaudit.findByNewvalue", query = "SELECT t FROM Tsafeaudit t WHERE t.newvalue = :newvalue"),
    @NamedQuery(name = "Tsafeaudit.findByAccount", query = "SELECT t FROM Tsafeaudit t WHERE t.account = :account"),
    @NamedQuery(name = "Tsafeaudit.findByPersoncode", query = "SELECT t FROM Tsafeaudit t WHERE t.personcode = :personcode"),
    @NamedQuery(name = "Tsafeaudit.findBySolicitudenumber", query = "SELECT t FROM Tsafeaudit t WHERE t.solicitudenumber = :solicitudenumber"),
    @NamedQuery(name = "Tsafeaudit.findByBrowser", query = "SELECT t FROM Tsafeaudit t WHERE t.browser = :browser"),
    @NamedQuery(name = "Tsafeaudit.findByOperativsystem", query = "SELECT t FROM Tsafeaudit t WHERE t.operativsystem = :operativsystem")})
public class Tsafeaudit implements Serializable {

    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected TsafeauditPK tsafeauditPK;
    @Basic(optional = false)
    @Column(name = "COMPANYCODE")
    private long companycode;
    @Column(name = "OFFICECODE")
    private Short officecode;
    @Column(name = "BRANCHCODE")
    private Short branchcode;
    @Column(name = "TERMINALCODE")
    private String terminalcode;
    @Basic(optional = false)
    @Column(name = "USERCODE")
    private String usercode;
    @Basic(optional = false)
    @Column(name = "TRANSACTIONMODULE")
    private String transactionmodule;
    @Basic(optional = false)
    @Column(name = "TRANSACTIONCODE")
    private short transactioncode;
    @Basic(optional = false)
    @Column(name = "TRANSACTIONVERSION")
    private short transactionversion;
    @Column(name = "OLDVALUE")
    private String oldvalue;
    @Column(name = "NEWVALUE")
    private String newvalue;
    @Column(name = "ACCOUNT")
    private String account;
    @Column(name = "PERSONCODE")
    private Long personcode;
    @Column(name = "SOLICITUDENUMBER")
    private String solicitudenumber;
    @Column(name = "BROWSER")
    private String browser;
    @Column(name = "OPERATIVSYSTEM")
    private String operativsystem;

    public Tsafeaudit() {
    }

    public Tsafeaudit(TsafeauditPK tsafeauditPK) {
        this.tsafeauditPK = tsafeauditPK;
    }

    public Tsafeaudit(TsafeauditPK tsafeauditPK, long companycode, String usercode, String transactionmodule, short transactioncode, short transactionversion) {
        this.tsafeauditPK = tsafeauditPK;
        this.companycode = companycode;
        this.usercode = usercode;
        this.transactionmodule = transactionmodule;
        this.transactioncode = transactioncode;
        this.transactionversion = transactionversion;
    }

    public Tsafeaudit(Date changedate, String tablename, String columnname, String partitiondb, Date realdate) {
        this.tsafeauditPK = new TsafeauditPK(changedate, tablename, columnname, partitiondb, realdate);
    }

    public TsafeauditPK getTsafeauditPK() {
        return tsafeauditPK;
    }

    public void setTsafeauditPK(TsafeauditPK tsafeauditPK) {
        this.tsafeauditPK = tsafeauditPK;
    }

    public long getCompanycode() {
        return companycode;
    }

    public void setCompanycode(long companycode) {
        this.companycode = companycode;
    }

    public Short getOfficecode() {
        return officecode;
    }

    public void setOfficecode(Short officecode) {
        this.officecode = officecode;
    }

    public Short getBranchcode() {
        return branchcode;
    }

    public void setBranchcode(Short branchcode) {
        this.branchcode = branchcode;
    }

    public String getTerminalcode() {
        return terminalcode;
    }

    public void setTerminalcode(String terminalcode) {
        this.terminalcode = terminalcode;
    }

    public String getUsercode() {
        return usercode;
    }

    public void setUsercode(String usercode) {
        this.usercode = usercode;
    }

    public String getTransactionmodule() {
        return transactionmodule;
    }

    public void setTransactionmodule(String transactionmodule) {
        this.transactionmodule = transactionmodule;
    }

    public short getTransactioncode() {
        return transactioncode;
    }

    public void setTransactioncode(short transactioncode) {
        this.transactioncode = transactioncode;
    }

    public short getTransactionversion() {
        return transactionversion;
    }

    public void setTransactionversion(short transactionversion) {
        this.transactionversion = transactionversion;
    }

    public String getOldvalue() {
        return oldvalue;
    }

    public void setOldvalue(String oldvalue) {
        this.oldvalue = oldvalue;
    }

    public String getNewvalue() {
        return newvalue;
    }

    public void setNewvalue(String newvalue) {
        this.newvalue = newvalue;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public Long getPersoncode() {
        return personcode;
    }

    public void setPersoncode(Long personcode) {
        this.personcode = personcode;
    }

    public String getSolicitudenumber() {
        return solicitudenumber;
    }

    public void setSolicitudenumber(String solicitudenumber) {
        this.solicitudenumber = solicitudenumber;
    }

    public String getBrowser() {
        return browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }

    public String getOperativsystem() {
        return operativsystem;
    }

    public void setOperativsystem(String operativsystem) {
        this.operativsystem = operativsystem;
    }

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

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