508 lines
13 KiB
Plaintext
Executable File
508 lines
13 KiB
Plaintext
Executable File
package com.fp.persistence.pgeneral.log;
|
||
|
||
import javax.persistence.Entity;
|
||
import java.sql.Timestamp;
|
||
import javax.persistence.Id;
|
||
import javax.persistence.Column;
|
||
import javax.persistence.EntityManager;
|
||
import java.io.Serializable;
|
||
import java.math.BigDecimal;
|
||
import javax.persistence.Table;
|
||
import com.fp.dto.hb.HibernateBean;
|
||
import java.lang.reflect.Field;
|
||
import javax.persistence.Transient;
|
||
import java.sql.Date;
|
||
|
||
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TGENETRANSACTIONLOG*/
|
||
@Entity(name="TgeneTransactionLog")
|
||
@Table(name="TGENETRANSACTIONLOG")
|
||
public class TgeneTransactionLog extends com.fp.dto.AbstractDataTransport implements Serializable,HibernateBean,Cloneable{
|
||
/**
|
||
* HashCode asociado con la Instancia
|
||
*/
|
||
@Transient
|
||
private int hashValue = 0;
|
||
/**
|
||
* Version de la Clase
|
||
*/
|
||
private static final long serialVersionUID = 1L;
|
||
/**
|
||
* Clave primaria de la Entidad TgeneTransactionLog
|
||
*/
|
||
@Id
|
||
@Column(name="JOURNALID" ,nullable=false, updatable=false)
|
||
private String pk;
|
||
@Column(name="TRANSACTIONMODULE", nullable=false)
|
||
|
||
/**
|
||
* Modulo al que pertence la transaccion
|
||
*/
|
||
private String transactionmodule;
|
||
|
||
@Column(name="TRANSACTIONCODE", nullable=false)
|
||
|
||
/**
|
||
* Codigo de transaccion dentro del modulo
|
||
*/
|
||
private Integer transactioncode;
|
||
|
||
@Column(name="TRANSACTIONVERSION", nullable=false)
|
||
|
||
/**
|
||
* Version de transaccion
|
||
*/
|
||
private Integer transactionversion;
|
||
|
||
@Column(name="ACCOUNTINGDATE", nullable=true)
|
||
|
||
/**
|
||
* Fecha contable en la que se ejecuta la transaccion
|
||
*/
|
||
private Date accountingdate;
|
||
|
||
@Column(name="SERVER", nullable=true)
|
||
|
||
/**
|
||
* Nombre del servidor de applicaicones desde el cual se ejecuta una transaccion
|
||
*/
|
||
private String server;
|
||
|
||
@Column(name="REALDATE", nullable=true)
|
||
|
||
/**
|
||
* Fecha real de ejecucion de una transaccion
|
||
*/
|
||
private Timestamp realdate;
|
||
|
||
@Column(name="COMPANYCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de compania
|
||
*/
|
||
private Integer companycode;
|
||
|
||
@Column(name="BRANCHCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de sucursal de ejecucion de la transaccion.
|
||
*/
|
||
private Integer branchcode;
|
||
|
||
@Column(name="OFFICECODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de oficina de ejecucion de la transaccion
|
||
*/
|
||
private Integer officecode;
|
||
|
||
@Column(name="TERMINALCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de terminal desde el cual se ejecuto la transaccion.
|
||
*/
|
||
private String terminalcode;
|
||
|
||
@Column(name="USERCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de usuario que ejecuta la transaccion
|
||
*/
|
||
private String usercode;
|
||
|
||
@Column(name="DURATION", nullable=true)
|
||
|
||
/**
|
||
* Tiempo que toma la ejeciucion de la transaccion
|
||
*/
|
||
private BigDecimal duration;
|
||
|
||
@Column(name="RESULTCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de resultado de ejecucion de la transaccion.
|
||
*/
|
||
private String resultcode;
|
||
|
||
@Column(name="USERMESSAGE", nullable=true)
|
||
|
||
/**
|
||
* Mensaje de usuario resultado de la ejecucion de la transaccion.
|
||
*/
|
||
private String usermessage;
|
||
|
||
@Column(name="ACCOUNT", nullable=true)
|
||
|
||
/**
|
||
* Numero de cuenta que se afecta en una transaccion
|
||
*/
|
||
private String account;
|
||
|
||
@Column(name="PERSONCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de persona asociado a la cuenta
|
||
*/
|
||
private Integer personcode;
|
||
|
||
@Column(name="SOLICITUDENUMBER", nullable=true)
|
||
|
||
/**
|
||
* Nuemero de solicitud
|
||
*/
|
||
private String solicitudenumber;
|
||
|
||
@Column(name="METHOD", nullable=true)
|
||
|
||
/**
|
||
* Metod que origina la ejecucion de la transaccion, Save, Query, Reporte
|
||
*/
|
||
private String method;
|
||
|
||
@Column(name="ADITIONALDATA", nullable=true)
|
||
|
||
/**
|
||
* Texto libre
|
||
*/
|
||
private String aditionaldata;
|
||
|
||
@Column(name="BROWSER", nullable=true)
|
||
|
||
/**
|
||
* Navegador de trabajo
|
||
*/
|
||
private String browser;
|
||
|
||
@Column(name="OPERATIVSYSTEM", nullable=true)
|
||
|
||
/**
|
||
* Sistema operativo de la m<>quina cliente
|
||
*/
|
||
private String operativsystem;
|
||
|
||
/**Contructor por defecto*/
|
||
public TgeneTransactionLog(){
|
||
}
|
||
/**Contructor de TgeneTransactionLog
|
||
@param pPk Clave Primaria del entity
|
||
@param pTransactionmodule Modulo al que pertence la transaccion
|
||
@param pTransactioncode Codigo de transaccion dentro del modulo
|
||
@param pTransactionversion Version de transaccion
|
||
*/
|
||
public TgeneTransactionLog(String pPk,String pTransactionmodule,Integer pTransactioncode,Integer pTransactionversion){
|
||
this();
|
||
pk=pPk;
|
||
transactionmodule=pTransactionmodule;
|
||
transactioncode=pTransactioncode;
|
||
transactionversion=pTransactionversion;
|
||
}
|
||
/**
|
||
* Metodo que entrega datos de la tabla dada la clave primaria.
|
||
* @param pEntityManager referencia de la session a obtener datos del bean.
|
||
* @param pKey Caleve primaria del bean.
|
||
* @return TgeneTransactionLog
|
||
*/
|
||
public static TgeneTransactionLog find(EntityManager pEntityManager,Object pKey) throws Exception{
|
||
TgeneTransactionLog obj = pEntityManager.find(TgeneTransactionLog.class,pKey);
|
||
return obj;
|
||
}
|
||
/**Entrega la Clave primaria de TgeneTransactionLog
|
||
@return El objeto que referencia a la Clave primaria de TgeneTransactionLog
|
||
*/
|
||
public String getPk(){
|
||
return pk;
|
||
}
|
||
/**Fija un nuevo valor a la Clave primaria de TgeneTransactionLog
|
||
@param pPk El objeto que referencia a la nueva Clave primaria de TgeneTransactionLog
|
||
*/
|
||
public void setPk(String pPk){
|
||
pk=pPk;
|
||
}
|
||
/**Obtiene el valor de transactionmodule
|
||
@return valor de transactionmodule*/
|
||
public String getTransactionmodule(){
|
||
return transactionmodule;
|
||
}
|
||
/**Fija el valor de transactionmodule
|
||
@param pTransactionmodule nuevo Valor de transactionmodule*/
|
||
public void setTransactionmodule(String pTransactionmodule){
|
||
transactionmodule=pTransactionmodule;
|
||
}
|
||
|
||
/**Obtiene el valor de transactioncode
|
||
@return valor de transactioncode*/
|
||
public Integer getTransactioncode(){
|
||
return transactioncode;
|
||
}
|
||
/**Fija el valor de transactioncode
|
||
@param pTransactioncode nuevo Valor de transactioncode*/
|
||
public void setTransactioncode(Integer pTransactioncode){
|
||
transactioncode=pTransactioncode;
|
||
}
|
||
|
||
/**Obtiene el valor de transactionversion
|
||
@return valor de transactionversion*/
|
||
public Integer getTransactionversion(){
|
||
return transactionversion;
|
||
}
|
||
/**Fija el valor de transactionversion
|
||
@param pTransactionversion nuevo Valor de transactionversion*/
|
||
public void setTransactionversion(Integer pTransactionversion){
|
||
transactionversion=pTransactionversion;
|
||
}
|
||
|
||
/**Obtiene el valor de accountingdate
|
||
@return valor de accountingdate*/
|
||
public Date getAccountingdate(){
|
||
return accountingdate;
|
||
}
|
||
/**Fija el valor de accountingdate
|
||
@param pAccountingdate nuevo Valor de accountingdate*/
|
||
public void setAccountingdate(Date pAccountingdate){
|
||
accountingdate=pAccountingdate;
|
||
}
|
||
|
||
/**Obtiene el valor de server
|
||
@return valor de server*/
|
||
public String getServer(){
|
||
return server;
|
||
}
|
||
/**Fija el valor de server
|
||
@param pServer nuevo Valor de server*/
|
||
public void setServer(String pServer){
|
||
server=pServer;
|
||
}
|
||
|
||
/**Obtiene el valor de realdate
|
||
@return valor de realdate*/
|
||
public Timestamp getRealdate(){
|
||
return realdate;
|
||
}
|
||
/**Fija el valor de realdate
|
||
@param pRealdate nuevo Valor de realdate*/
|
||
public void setRealdate(Timestamp pRealdate){
|
||
realdate=pRealdate;
|
||
}
|
||
|
||
/**Obtiene el valor de companycode
|
||
@return valor de companycode*/
|
||
public Integer getCompanycode(){
|
||
return companycode;
|
||
}
|
||
/**Fija el valor de companycode
|
||
@param pCompanycode nuevo Valor de companycode*/
|
||
public void setCompanycode(Integer pCompanycode){
|
||
companycode=pCompanycode;
|
||
}
|
||
|
||
/**Obtiene el valor de branchcode
|
||
@return valor de branchcode*/
|
||
public Integer getBranchcode(){
|
||
return branchcode;
|
||
}
|
||
/**Fija el valor de branchcode
|
||
@param pBranchcode nuevo Valor de branchcode*/
|
||
public void setBranchcode(Integer pBranchcode){
|
||
branchcode=pBranchcode;
|
||
}
|
||
|
||
/**Obtiene el valor de officecode
|
||
@return valor de officecode*/
|
||
public Integer getOfficecode(){
|
||
return officecode;
|
||
}
|
||
/**Fija el valor de officecode
|
||
@param pOfficecode nuevo Valor de officecode*/
|
||
public void setOfficecode(Integer pOfficecode){
|
||
officecode=pOfficecode;
|
||
}
|
||
|
||
/**Obtiene el valor de terminalcode
|
||
@return valor de terminalcode*/
|
||
public String getTerminalcode(){
|
||
return terminalcode;
|
||
}
|
||
/**Fija el valor de terminalcode
|
||
@param pTerminalcode nuevo Valor de terminalcode*/
|
||
public void setTerminalcode(String pTerminalcode){
|
||
terminalcode=pTerminalcode;
|
||
}
|
||
|
||
/**Obtiene el valor de usercode
|
||
@return valor de usercode*/
|
||
public String getUsercode(){
|
||
return usercode;
|
||
}
|
||
/**Fija el valor de usercode
|
||
@param pUsercode nuevo Valor de usercode*/
|
||
public void setUsercode(String pUsercode){
|
||
usercode=pUsercode;
|
||
}
|
||
|
||
/**Obtiene el valor de duration
|
||
@return valor de duration*/
|
||
public BigDecimal getDuration(){
|
||
return duration;
|
||
}
|
||
/**Fija el valor de duration
|
||
@param pDuration nuevo Valor de duration*/
|
||
public void setDuration(BigDecimal pDuration){
|
||
duration=pDuration;
|
||
}
|
||
|
||
/**Obtiene el valor de resultcode
|
||
@return valor de resultcode*/
|
||
public String getResultcode(){
|
||
return resultcode;
|
||
}
|
||
/**Fija el valor de resultcode
|
||
@param pResultcode nuevo Valor de resultcode*/
|
||
public void setResultcode(String pResultcode){
|
||
resultcode=pResultcode;
|
||
}
|
||
|
||
/**Obtiene el valor de usermessage
|
||
@return valor de usermessage*/
|
||
public String getUsermessage(){
|
||
return usermessage;
|
||
}
|
||
/**Fija el valor de usermessage
|
||
@param pUsermessage nuevo Valor de usermessage*/
|
||
public void setUsermessage(String pUsermessage){
|
||
usermessage=pUsermessage;
|
||
}
|
||
|
||
/**Obtiene el valor de account
|
||
@return valor de account*/
|
||
public String getAccount(){
|
||
return account;
|
||
}
|
||
/**Fija el valor de account
|
||
@param pAccount nuevo Valor de account*/
|
||
public void setAccount(String pAccount){
|
||
account=pAccount;
|
||
}
|
||
|
||
/**Obtiene el valor de personcode
|
||
@return valor de personcode*/
|
||
public Integer getPersoncode(){
|
||
return personcode;
|
||
}
|
||
/**Fija el valor de personcode
|
||
@param pPersoncode nuevo Valor de personcode*/
|
||
public void setPersoncode(Integer pPersoncode){
|
||
personcode=pPersoncode;
|
||
}
|
||
|
||
/**Obtiene el valor de solicitudenumber
|
||
@return valor de solicitudenumber*/
|
||
public String getSolicitudenumber(){
|
||
return solicitudenumber;
|
||
}
|
||
/**Fija el valor de solicitudenumber
|
||
@param pSolicitudenumber nuevo Valor de solicitudenumber*/
|
||
public void setSolicitudenumber(String pSolicitudenumber){
|
||
solicitudenumber=pSolicitudenumber;
|
||
}
|
||
|
||
/**Obtiene el valor de method
|
||
@return valor de method*/
|
||
public String getMethod(){
|
||
return method;
|
||
}
|
||
/**Fija el valor de method
|
||
@param pMethod nuevo Valor de method*/
|
||
public void setMethod(String pMethod){
|
||
method=pMethod;
|
||
}
|
||
|
||
/**Obtiene el valor de aditionaldata
|
||
@return valor de aditionaldata*/
|
||
public String getAditionaldata(){
|
||
return aditionaldata;
|
||
}
|
||
/**Fija el valor de aditionaldata
|
||
@param pAditionaldata nuevo Valor de aditionaldata*/
|
||
public void setAditionaldata(String pAditionaldata){
|
||
aditionaldata=pAditionaldata;
|
||
}
|
||
|
||
/**Obtiene el valor de browser
|
||
@return valor de browser*/
|
||
public String getBrowser(){
|
||
return browser;
|
||
}
|
||
/**Fija el valor de browser
|
||
@param pBrowser nuevo Valor de browser*/
|
||
public void setBrowser(String pBrowser){
|
||
browser=pBrowser;
|
||
}
|
||
|
||
/**Obtiene el valor de operativsystem
|
||
@return valor de operativsystem*/
|
||
public String getOperativsystem(){
|
||
return operativsystem;
|
||
}
|
||
/**Fija el valor de operativsystem
|
||
@param pOperativsystem nuevo Valor de operativsystem*/
|
||
public void setOperativsystem(String pOperativsystem){
|
||
operativsystem=pOperativsystem;
|
||
}
|
||
|
||
public boolean equals(Object rhs){
|
||
if (rhs == null)return false;
|
||
if (! (rhs instanceof TgeneTransactionLog))return false;
|
||
TgeneTransactionLog that = (TgeneTransactionLog) rhs;
|
||
if (this.getPk() == null || that.getPk() == null)
|
||
return false;
|
||
return (this.getPk().equals(that.getPk()));
|
||
}
|
||
/**Implementacion del metodo hashCode de la la entidad TgeneTransactionLog
|
||
@return el hashCode la instancia
|
||
*/
|
||
public int hashCode() {
|
||
if (this.hashValue == 0){
|
||
int result = 17;
|
||
if (this.getPk() == null){
|
||
result = super.hashCode();
|
||
}else{
|
||
result = this.getPk().hashCode();
|
||
}
|
||
this.hashValue = result;
|
||
}
|
||
return this.hashValue;
|
||
}
|
||
/**Implementacion toString
|
||
*/
|
||
public String toString() {
|
||
Field[]fs=this.getClass().getDeclaredFields();
|
||
String data="";
|
||
for(Field f:fs){
|
||
try{
|
||
String name=f.getName();
|
||
if(f.getType().getName().compareTo("java.util.Set")==0)continue;
|
||
if(name.compareTo("hashValue")==0||name.compareTo("serialVersionUID")==0)continue;
|
||
data+=name+"="+f.get(this)+";";
|
||
}catch(Exception e){
|
||
continue;
|
||
}
|
||
}
|
||
if(data.compareTo("")==0){
|
||
data=super.toString();
|
||
}
|
||
return data;
|
||
}
|
||
/**Implementacion de la creacion de un bean en blanco TgeneTransactionLog
|
||
*/
|
||
public Object createInstance(){
|
||
TgeneTransactionLog instance=new TgeneTransactionLog();
|
||
return instance;
|
||
}
|
||
/**Clona la entidad TgeneTransactionLog
|
||
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
public Object cloneMe() throws CloneNotSupportedException{
|
||
TgeneTransactionLog p=(TgeneTransactionLog)this.clone();
|
||
return p;
|
||
}
|
||
}
|