268 lines
8.1 KiB
Plaintext
Executable File
268 lines
8.1 KiB
Plaintext
Executable File
package com.fp.persistence.pgeneral.trans.report;
|
||
|
||
import javax.persistence.EmbeddedId;
|
||
import javax.persistence.Entity;
|
||
import javax.persistence.Column;
|
||
import javax.persistence.EntityManager;
|
||
import javax.persistence.GeneratedValue;
|
||
|
||
import java.io.Serializable;
|
||
|
||
import javax.persistence.Table;
|
||
|
||
import com.fp.dto.hb.HibernateBean;
|
||
|
||
import javax.persistence.Version;
|
||
|
||
import java.lang.reflect.Field;
|
||
|
||
import javax.persistence.Transient;
|
||
|
||
import org.hibernate.annotations.GenericGenerator;
|
||
import org.hibernate.annotations.Parameter;
|
||
|
||
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TGENETRANSACTIONREPORTS*/
|
||
@Entity(name="TgeneTransactionReports")
|
||
@Table(name="TGENETRANSACTIONREPORTS")
|
||
public class TgeneTransactionReports 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 TgeneTransactionProcess
|
||
*/
|
||
@EmbeddedId
|
||
@GenericGenerator(name = "seq_id", strategy = "com.fp.general.keygen.SubSequenceKey", parameters = {
|
||
@Parameter(name = "sql", value = "select coalesce(max(SEQUENCE),0)+1 from TGENETRANSACTIONREPORTS "
|
||
+ "where TRANSACTIONMODULE=:transactionmodule " + "and TRANSACTIONCODE=:transactioncode "
|
||
+ "and TRANSACTIONVERSION=:transactionversion "),
|
||
@Parameter(name = "type", value = "java.lang.Integer"),
|
||
@Parameter(name = "param", value = "transactionmodule,pk.transactionmodule;transactioncode,pk.transactioncode;transactionversion,pk.transactionversion"),
|
||
@Parameter(name = "field", value = "sequence") })
|
||
@GeneratedValue(generator = "seq_id")
|
||
private TgeneTransactionReportsKey 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;
|
||
|
||
@Version
|
||
@Column(name="RECORDVERSION", nullable=true)
|
||
|
||
/**
|
||
* Optimistic locking del registro
|
||
*/
|
||
private Integer recordversion;
|
||
|
||
@Column(name="EXECUTIONORDER", nullable=true)
|
||
|
||
/**
|
||
* orden de ejecucion de la regla de negocio.
|
||
*/
|
||
private Integer executionorder;
|
||
|
||
@Column(name="STATUS", nullable=true)
|
||
|
||
/**
|
||
* A indica que la regla esta activa, I regla Inactiva
|
||
*/
|
||
private String status;
|
||
|
||
@Column(name="MANAGECACHE", nullable=true)
|
||
|
||
/**
|
||
* Indica si el registro se almacena en cache del servidor de aplicaicones
|
||
*/
|
||
private String managecache;
|
||
|
||
/**Contructor por defecto*/
|
||
public TgeneTransactionReports(){
|
||
}
|
||
/**Contructor de TgeneTransactionReports
|
||
@param pPk Clave Primaria del entity
|
||
*/
|
||
public TgeneTransactionReports(TgeneTransactionReportsKey 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 TgeneTransactionReports
|
||
*/
|
||
public static TgeneTransactionReports find(EntityManager pEntityManager,TgeneTransactionReportsKey pKey) throws Exception{
|
||
TgeneTransactionReports obj = pEntityManager.find(TgeneTransactionReports.class,pKey);
|
||
return obj;
|
||
}
|
||
/**Entrega la Clave primaria de TgeneTransactionReports
|
||
@return El objeto que referencia a la Clave primaria de TgeneTransactionReports
|
||
*/
|
||
public TgeneTransactionReportsKey getPk(){
|
||
return pk;
|
||
}
|
||
/**Fija un nuevo valor a la Clave primaria de TgeneTransactionReports
|
||
@param pPk El objeto que referencia a la nueva Clave primaria de TgeneTransactionReports
|
||
*/
|
||
public void setPk(TgeneTransactionReportsKey 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 recordversion
|
||
@return valor de recordversion*/
|
||
public Integer getRecordversion(){
|
||
return recordversion;
|
||
}
|
||
/**Fija el valor de recordversion
|
||
@param pRecordversion nuevo Valor de recordversion*/
|
||
public void setRecordversion(Integer pRecordversion){
|
||
recordversion=pRecordversion;
|
||
}
|
||
|
||
/**Obtiene el valor de executionorder
|
||
@return valor de executionorder*/
|
||
public Integer getExecutionorder(){
|
||
return executionorder;
|
||
}
|
||
/**Fija el valor de executionorder
|
||
@param pExecutionorder nuevo Valor de executionorder*/
|
||
public void setExecutionorder(Integer pExecutionorder){
|
||
executionorder=pExecutionorder;
|
||
}
|
||
|
||
/**Obtiene el valor de status
|
||
@return valor de status*/
|
||
public String getStatus(){
|
||
return status;
|
||
}
|
||
/**Fija el valor de status
|
||
@param pStatus nuevo Valor de status*/
|
||
public void setStatus(String pStatus){
|
||
status=pStatus;
|
||
}
|
||
|
||
/**Obtiene el valor de managecache
|
||
@return valor de managecache*/
|
||
public String getManagecache(){
|
||
return managecache;
|
||
}
|
||
/**Fija el valor de managecache
|
||
@param pManagecache nuevo Valor de managecache*/
|
||
public void setManagecache(String pManagecache){
|
||
managecache=pManagecache;
|
||
}
|
||
|
||
public boolean equals(Object rhs){
|
||
if (rhs == null)return false;
|
||
if (! (rhs instanceof TgeneTransactionReports))return false;
|
||
TgeneTransactionReports that = (TgeneTransactionReports) 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 TgeneTransactionReports
|
||
@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 TgeneTransactionReports
|
||
*/
|
||
public Object createInstance(){
|
||
TgeneTransactionReports instance=new TgeneTransactionReports();
|
||
instance.setPk(new TgeneTransactionReportsKey());
|
||
return instance;
|
||
}
|
||
/**Clona la entidad TgeneTransactionReports
|
||
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
public Object cloneMe() throws CloneNotSupportedException{
|
||
TgeneTransactionReports p=(TgeneTransactionReports)this.clone();
|
||
p.setPk((TgeneTransactionReportsKey)this.pk.cloneMe());
|
||
return p;
|
||
}
|
||
}
|