229 lines
6.4 KiB
Plaintext
Executable File
229 lines
6.4 KiB
Plaintext
Executable File
package com.fp.persistence.pgeneral.schedule;
|
||
|
||
import javax.persistence.Entity;
|
||
import javax.persistence.Id;
|
||
import javax.persistence.Column;
|
||
import javax.persistence.EntityManager;
|
||
import java.io.Serializable;
|
||
import javax.persistence.Table;
|
||
import com.fp.dto.hb.HibernateBean;
|
||
import java.lang.reflect.Field;
|
||
import javax.persistence.Transient;
|
||
|
||
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TGENESCHEDULEPROCESS*/
|
||
@Entity(name="TgeneScheduleProcess")
|
||
@Table(name="TGENESCHEDULEPROCESS")
|
||
public class TgeneScheduleProcess 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 TgeneScheduleProcess
|
||
*/
|
||
@Id
|
||
@Column(name="EVENTCODE" ,nullable=false, updatable=false)
|
||
private String pk;
|
||
@Column(name="PROCESSCODE", nullable=true)
|
||
|
||
/**
|
||
* Paquete clase de un comando a ejecutar.
|
||
*/
|
||
private String processcode;
|
||
|
||
@Column(name="CATALOGTYPEPROCESS", nullable=true)
|
||
|
||
/**
|
||
* Codigo de catalogo GEN proceso general consulta, mantenimiento, TRA a nivel de transaccion finacniera, ITEM a niveld e rubro de una trnsaccion financiera, BATH comandos de fin de dia
|
||
*/
|
||
private String catalogtypeprocess;
|
||
|
||
@Column(name="CATALOGCODETYPEPROCESS", nullable=true)
|
||
|
||
/**
|
||
* Codigo de tabla de catalogo del proceso de negocio de la aplicacion
|
||
*/
|
||
private String catalogcodetypeprocess;
|
||
|
||
@Column(name="TRANSACTIONMODULE", nullable=true)
|
||
|
||
/**
|
||
* Modulo al que pertence la transaccion
|
||
*/
|
||
private String transactionmodule;
|
||
|
||
@Column(name="TRANSACTIONCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de transaccion dentro del modulo
|
||
*/
|
||
private Integer transactioncode;
|
||
|
||
@Column(name="TRANSACTIONVERSION", nullable=true)
|
||
|
||
/**
|
||
* Version de transaccion
|
||
*/
|
||
private Integer transactionversion;
|
||
|
||
/**Contructor por defecto*/
|
||
public TgeneScheduleProcess(){
|
||
}
|
||
/**Contructor de TgeneScheduleProcess
|
||
@param pPk Clave Primaria del entity
|
||
*/
|
||
public TgeneScheduleProcess(String pPk){
|
||
this();
|
||
pk=pPk;
|
||
}
|
||
/**
|
||
* 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 TgeneScheduleProcess
|
||
*/
|
||
public static TgeneScheduleProcess find(EntityManager pEntityManager,Object pKey) throws Exception{
|
||
TgeneScheduleProcess obj = pEntityManager.find(TgeneScheduleProcess.class,pKey);
|
||
return obj;
|
||
}
|
||
/**Entrega la Clave primaria de TgeneScheduleProcess
|
||
@return El objeto que referencia a la Clave primaria de TgeneScheduleProcess
|
||
*/
|
||
public String getPk(){
|
||
return pk;
|
||
}
|
||
/**Fija un nuevo valor a la Clave primaria de TgeneScheduleProcess
|
||
@param pPk El objeto que referencia a la nueva Clave primaria de TgeneScheduleProcess
|
||
*/
|
||
public void setPk(String pPk){
|
||
pk=pPk;
|
||
}
|
||
/**Obtiene el valor de processcode
|
||
@return valor de processcode*/
|
||
public String getProcesscode(){
|
||
return processcode;
|
||
}
|
||
/**Fija el valor de processcode
|
||
@param pProcesscode nuevo Valor de processcode*/
|
||
public void setProcesscode(String pProcesscode){
|
||
processcode=pProcesscode;
|
||
}
|
||
|
||
/**Obtiene el valor de catalogtypeprocess
|
||
@return valor de catalogtypeprocess*/
|
||
public String getCatalogtypeprocess(){
|
||
return catalogtypeprocess;
|
||
}
|
||
/**Fija el valor de catalogtypeprocess
|
||
@param pCatalogtypeprocess nuevo Valor de catalogtypeprocess*/
|
||
public void setCatalogtypeprocess(String pCatalogtypeprocess){
|
||
catalogtypeprocess=pCatalogtypeprocess;
|
||
}
|
||
|
||
/**Obtiene el valor de catalogcodetypeprocess
|
||
@return valor de catalogcodetypeprocess*/
|
||
public String getCatalogcodetypeprocess(){
|
||
return catalogcodetypeprocess;
|
||
}
|
||
/**Fija el valor de catalogcodetypeprocess
|
||
@param pCatalogcodetypeprocess nuevo Valor de catalogcodetypeprocess*/
|
||
public void setCatalogcodetypeprocess(String pCatalogcodetypeprocess){
|
||
catalogcodetypeprocess=pCatalogcodetypeprocess;
|
||
}
|
||
|
||
/**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;
|
||
}
|
||
|
||
public boolean equals(Object rhs){
|
||
if (rhs == null)return false;
|
||
if (! (rhs instanceof TgeneScheduleProcess))return false;
|
||
TgeneScheduleProcess that = (TgeneScheduleProcess) rhs;
|
||
if (this.getPk() == null || that.getPk() == null)
|
||
return false;
|
||
return (this.getPk().equals(that.getPk()));
|
||
}
|
||
/**Implementaci<63>n del metodo hashCode de la la entidad TgeneScheduleProcess
|
||
@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;
|
||
}
|
||
/**Implementaci<63>n 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;
|
||
}
|
||
/**Implementaci<63>n de la creaci<63>n de un bean en blanco TgeneScheduleProcess
|
||
*/
|
||
public Object createInstance(){
|
||
TgeneScheduleProcess instance=new TgeneScheduleProcess();
|
||
return instance;
|
||
}
|
||
/**Clona la entidad TgeneScheduleProcess
|
||
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
public Object cloneMe() throws CloneNotSupportedException{
|
||
TgeneScheduleProcess p=(TgeneScheduleProcess)this.clone();
|
||
return p;
|
||
}
|
||
}
|