432 lines
12 KiB
Plaintext
Executable File
432 lines
12 KiB
Plaintext
Executable File
package com.fp.persistence.pgeneral.trans;
|
||
|
||
import java.io.Serializable;
|
||
import java.lang.reflect.Field;
|
||
|
||
import javax.persistence.Column;
|
||
import javax.persistence.EmbeddedId;
|
||
import javax.persistence.Entity;
|
||
import javax.persistence.EntityManager;
|
||
import javax.persistence.GeneratedValue;
|
||
import javax.persistence.Table;
|
||
import javax.persistence.Transient;
|
||
import javax.persistence.Version;
|
||
|
||
import org.hibernate.annotations.GenericGenerator;
|
||
import org.hibernate.annotations.Parameter;
|
||
|
||
import com.fp.dto.hb.HibernateBean;
|
||
|
||
/** Clase que implementa la entidad de Hibernate que hace referencia a la tabla TGENETRANSACTIONPROCESS */
|
||
@Entity(name = "TgeneTransactionProcess")
|
||
@Table(name = "TGENETRANSACTIONPROCESS")
|
||
public class TgeneTransactionProcess 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 TGENETRANSACTIONPROCESS "
|
||
+ "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 TgeneTransactionProcessKey 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;
|
||
|
||
@Column(name = "ISFLOW", nullable = true)
|
||
/**
|
||
* Y Indica que el origen de ejecucion del componente es un flujo del bpm
|
||
*/
|
||
private String isflow;
|
||
|
||
@Column(name = "PROCESSNAME", nullable = true)
|
||
/**
|
||
* Nombre del flujo bpm a ejecutar
|
||
*/
|
||
private String processname;
|
||
|
||
@Column(name = "RULENAME", nullable = true)
|
||
/**
|
||
* Nombre de la regla a ejecutar
|
||
*/
|
||
private String rulename;
|
||
|
||
@Column(name = "FLOWMESSAGECODE", nullable = true)
|
||
/**
|
||
* Codigo de mensaje del flujo a presentar al cliente
|
||
*/
|
||
private String flowmessagecode;
|
||
|
||
/** Contructor por defecto */
|
||
public TgeneTransactionProcess() {
|
||
}
|
||
|
||
/**
|
||
* Contructor de TgeneTransactionProcess
|
||
*
|
||
* @param pPk Clave Primaria del entity
|
||
*/
|
||
public TgeneTransactionProcess(TgeneTransactionProcessKey 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 TgeneTransactionProcess
|
||
*/
|
||
public static TgeneTransactionProcess find(EntityManager pEntityManager, TgeneTransactionProcessKey pKey) throws Exception {
|
||
TgeneTransactionProcess obj = pEntityManager.find(TgeneTransactionProcess.class, pKey);
|
||
return obj;
|
||
}
|
||
|
||
/**
|
||
* Entrega la Clave primaria de TgeneTransactionProcess
|
||
*
|
||
* @return El objeto que referencia a la Clave primaria de TgeneTransactionProcess
|
||
*/
|
||
public TgeneTransactionProcessKey getPk() {
|
||
return pk;
|
||
}
|
||
|
||
/**
|
||
* Fija un nuevo valor a la Clave primaria de TgeneTransactionProcess
|
||
*
|
||
* @param pPk El objeto que referencia a la nueva Clave primaria de TgeneTransactionProcess
|
||
*/
|
||
public void setPk(TgeneTransactionProcessKey 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;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de isflow
|
||
*
|
||
* @return valor de isflow
|
||
*/
|
||
public String getIsflow() {
|
||
return isflow;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de isflow
|
||
*
|
||
* @param pIsflow nuevo Valor de isflow
|
||
*/
|
||
public void setIsflow(String pIsflow) {
|
||
isflow = pIsflow;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de processname
|
||
*
|
||
* @return valor de processname
|
||
*/
|
||
public String getProcessname() {
|
||
return processname;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de processname
|
||
*
|
||
* @param pProcessname nuevo Valor de processname
|
||
*/
|
||
public void setProcessname(String pProcessname) {
|
||
processname = pProcessname;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de rulename
|
||
*
|
||
* @return valor de rulename
|
||
*/
|
||
public String getRulename() {
|
||
return rulename;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de rulename
|
||
*
|
||
* @param pRulename nuevo Valor de rulename
|
||
*/
|
||
public void setRulename(String pRulename) {
|
||
rulename = pRulename;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de flowmessagecode
|
||
*
|
||
* @return valor de flowmessagecode
|
||
*/
|
||
public String getFlowmessagecode() {
|
||
return flowmessagecode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de flowmessagecode
|
||
*
|
||
* @param pFlowmessagecode nuevo Valor de flowmessagecode
|
||
*/
|
||
public void setFlowmessagecode(String pFlowmessagecode) {
|
||
flowmessagecode = pFlowmessagecode;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object rhs) {
|
||
if (rhs == null)
|
||
return false;
|
||
if (!(rhs instanceof TgeneTransactionProcess))
|
||
return false;
|
||
TgeneTransactionProcess that = (TgeneTransactionProcess) 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 TgeneTransactionProcess
|
||
*
|
||
* @return el hashCode la instancia
|
||
*/
|
||
@Override
|
||
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 */
|
||
@Override
|
||
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 TgeneTransactionProcess */
|
||
@Override
|
||
public Object createInstance() {
|
||
TgeneTransactionProcess instance = new TgeneTransactionProcess();
|
||
instance.setPk(new TgeneTransactionProcessKey());
|
||
return instance;
|
||
}
|
||
|
||
/**
|
||
* Clona la entidad TgeneTransactionProcess
|
||
*
|
||
* @see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
@Override
|
||
public Object cloneMe() throws CloneNotSupportedException {
|
||
TgeneTransactionProcess p = (TgeneTransactionProcess) this.clone();
|
||
p.setPk((TgeneTransactionProcessKey) this.pk.cloneMe());
|
||
return p;
|
||
}
|
||
}
|