510 lines
12 KiB
Plaintext
Executable File
510 lines
12 KiB
Plaintext
Executable File
package com.fp.persistence.pgeneral.gene;
|
||
|
||
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 javax.persistence.Table;
|
||
import com.fp.dto.hb.HibernateBean;
|
||
import java.lang.reflect.Field;
|
||
import javax.persistence.Transient;
|
||
import java.sql.Date;
|
||
import java.util.List;
|
||
import javax.persistence.Query;
|
||
|
||
/**
|
||
* Clase que implementa la entidad de Hibernate que hace referencia a la tabla
|
||
* TGENECONSEPLOG
|
||
*/
|
||
@Entity(name = "TgeneConsepLog")
|
||
@Table(name = "TGENECONSEPLOG")
|
||
public class TgeneConsepLog 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 TgeneConsepLog
|
||
*/
|
||
@Id
|
||
@Column(name = "ID_LOG", nullable = false, updatable = false)
|
||
private Integer pk;
|
||
@Column(name = "IDENTIFICACION", nullable = true)
|
||
/**
|
||
* Numero de identificaion del cliente (RUC, CI, Pasaporte)
|
||
*/
|
||
private String identificacion;
|
||
@Column(name = "NOMBRE_PRIM", nullable = true)
|
||
/**
|
||
* Primer nombre del cliente
|
||
*/
|
||
private String nombre_prim;
|
||
@Column(name = "NOMBRE_SEG", nullable = true)
|
||
/**
|
||
* Segundo nombre del cliente
|
||
*/
|
||
private String nombre_seg;
|
||
@Column(name = "APELLIDO_PRIM", nullable = true)
|
||
/**
|
||
* Primer apellido del cliente
|
||
*/
|
||
private String apellido_prim;
|
||
@Column(name = "APELLIDO_SEG", nullable = true)
|
||
/**
|
||
* Segundo apellido del cliente opcional
|
||
*/
|
||
private String apellido_seg;
|
||
@Column(name = "ID_LISTANEGRA", nullable = true)
|
||
/**
|
||
* Identificador de la lista negra (CONSEP)
|
||
*/
|
||
private String id_listanegra;
|
||
@Column(name = "ID_TIPLISNEG", nullable = true)
|
||
/**
|
||
* Codigo del tipo CONSEP 1,2(SindicadoHomonimo,) respectivamente
|
||
*/
|
||
private Long id_tiplisneg;
|
||
@Column(name = "FEC_ING_LISNEG", nullable = true)
|
||
/**
|
||
* Fecha de regsitro en la tabla de CONSEP
|
||
*/
|
||
private Date fec_ing_lisneg;
|
||
@Column(name = "USUARIO_COD", nullable = true)
|
||
/**
|
||
* Codigo de usuario que aplica la transaccion
|
||
*/
|
||
private String usuario_cod;
|
||
@Column(name = "FEC_TRANSACCION", nullable = true)
|
||
/**
|
||
* Fecha que se ingreso a la transaccion
|
||
*/
|
||
private Timestamp fec_transaccion;
|
||
@Column(name = "TERMINAL", nullable = true)
|
||
/**
|
||
* Terminal desde donde se ingresos al aplicativo
|
||
*/
|
||
private String terminal;
|
||
@Column(name = "TRANSACCION", nullable = true)
|
||
/**
|
||
* Tipo de transaccion N, U (nuevo o actualizacion) respectivamente
|
||
*/
|
||
private String transaccion;
|
||
@Column(name = "CREACION_CLI", nullable = true)
|
||
/**
|
||
* En la transaccion actual se creo un nuevo cliente si/no (S/N)
|
||
*/
|
||
private String creacion_cli;
|
||
@Column(name = "ACTUALIZACION_CLI", nullable = true)
|
||
/**
|
||
* En la transaccion actual se realizo una actualizacion del cliente si/no
|
||
* (S/N)
|
||
*/
|
||
private String actualizacion_cli;
|
||
@Column(name = "CONSTANCIA_CONSEP", nullable = true)
|
||
/**
|
||
* La persona se encuentra en la lista de CONSEP si/no (S/N)
|
||
*/
|
||
private String constancia_consep;
|
||
|
||
/**
|
||
* Contructor por defecto
|
||
*/
|
||
public TgeneConsepLog() {
|
||
}
|
||
|
||
/**
|
||
* Contructor de TgeneConsepLog
|
||
*
|
||
* @param pPk Clave Primaria del entity
|
||
*/
|
||
public TgeneConsepLog(Integer 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 TgeneConsepLog
|
||
*/
|
||
public static TgeneConsepLog find(EntityManager pEntityManager, Object pKey) throws Exception {
|
||
TgeneConsepLog obj = pEntityManager.find(TgeneConsepLog.class, pKey);
|
||
return obj;
|
||
}
|
||
|
||
/**
|
||
* Entrega la Clave primaria de TgeneConsepLog
|
||
*
|
||
* @return El objeto que referencia a la Clave primaria de TgeneConsepLog
|
||
*/
|
||
public Integer getPk() {
|
||
return pk;
|
||
}
|
||
|
||
/**
|
||
* Fija un nuevo valor a la Clave primaria de TgeneConsepLog
|
||
*
|
||
* @param pPk El objeto que referencia a la nueva Clave primaria de
|
||
* TgeneConsepLog
|
||
*/
|
||
public void setPk(Integer pPk) {
|
||
pk = pPk;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de identificacion
|
||
*
|
||
* @return valor de identificacion
|
||
*/
|
||
public String getIdentificacion() {
|
||
return identificacion;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de identificacion
|
||
*
|
||
* @param pIdentificacion nuevo Valor de identificacion
|
||
*/
|
||
public void setIdentificacion(String pIdentificacion) {
|
||
identificacion = pIdentificacion;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de nombre_prim
|
||
*
|
||
* @return valor de nombre_prim
|
||
*/
|
||
public String getNombre_prim() {
|
||
return nombre_prim;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de nombre_prim
|
||
*
|
||
* @param pNombre_prim nuevo Valor de nombre_prim
|
||
*/
|
||
public void setNombre_prim(String pNombre_prim) {
|
||
nombre_prim = pNombre_prim;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de nombre_seg
|
||
*
|
||
* @return valor de nombre_seg
|
||
*/
|
||
public String getNombre_seg() {
|
||
return nombre_seg;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de nombre_seg
|
||
*
|
||
* @param pNombre_seg nuevo Valor de nombre_seg
|
||
*/
|
||
public void setNombre_seg(String pNombre_seg) {
|
||
nombre_seg = pNombre_seg;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de apellido_prim
|
||
*
|
||
* @return valor de apellido_prim
|
||
*/
|
||
public String getApellido_prim() {
|
||
return apellido_prim;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de apellido_prim
|
||
*
|
||
* @param pApellido_prim nuevo Valor de apellido_prim
|
||
*/
|
||
public void setApellido_prim(String pApellido_prim) {
|
||
apellido_prim = pApellido_prim;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de apellido_seg
|
||
*
|
||
* @return valor de apellido_seg
|
||
*/
|
||
public String getApellido_seg() {
|
||
return apellido_seg;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de apellido_seg
|
||
*
|
||
* @param pApellido_seg nuevo Valor de apellido_seg
|
||
*/
|
||
public void setApellido_seg(String pApellido_seg) {
|
||
apellido_seg = pApellido_seg;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de id_listanegra
|
||
*
|
||
* @return valor de id_listanegra
|
||
*/
|
||
public String getId_listanegra() {
|
||
return id_listanegra;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de id_listanegra
|
||
*
|
||
* @param pId_listanegra nuevo Valor de id_listanegra
|
||
*/
|
||
public void setId_listanegra(String pId_listanegra) {
|
||
id_listanegra = pId_listanegra;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de id_tiplisneg
|
||
*
|
||
* @return valor de id_tiplisneg
|
||
*/
|
||
public Long getId_tiplisneg() {
|
||
return id_tiplisneg;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de id_tiplisneg
|
||
*
|
||
* @param pId_tiplisneg nuevo Valor de id_tiplisneg
|
||
*/
|
||
public void setId_tiplisneg(Long pId_tiplisneg) {
|
||
id_tiplisneg = pId_tiplisneg;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de fec_ing_lisneg
|
||
*
|
||
* @return valor de fec_ing_lisneg
|
||
*/
|
||
public Date getFec_ing_lisneg() {
|
||
return fec_ing_lisneg;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de fec_ing_lisneg
|
||
*
|
||
* @param pFec_ing_lisneg nuevo Valor de fec_ing_lisneg
|
||
*/
|
||
public void setFec_ing_lisneg(Date pFec_ing_lisneg) {
|
||
fec_ing_lisneg = pFec_ing_lisneg;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de usuario_cod
|
||
*
|
||
* @return valor de usuario_cod
|
||
*/
|
||
public String getUsuario_cod() {
|
||
return usuario_cod;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de usuario_cod
|
||
*
|
||
* @param pUsuario_cod nuevo Valor de usuario_cod
|
||
*/
|
||
public void setUsuario_cod(String pUsuario_cod) {
|
||
usuario_cod = pUsuario_cod;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de fec_transaccion
|
||
*
|
||
* @return valor de fec_transaccion
|
||
*/
|
||
public Timestamp getFec_transaccion() {
|
||
return fec_transaccion;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de fec_transaccion
|
||
*
|
||
* @param pFec_transaccion nuevo Valor de fec_transaccion
|
||
*/
|
||
public void setFec_transaccion(Timestamp pFec_transaccion) {
|
||
fec_transaccion = pFec_transaccion;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de terminal
|
||
*
|
||
* @return valor de terminal
|
||
*/
|
||
public String getTerminal() {
|
||
return terminal;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de terminal
|
||
*
|
||
* @param pTerminal nuevo Valor de terminal
|
||
*/
|
||
public void setTerminal(String pTerminal) {
|
||
terminal = pTerminal;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de transaccion
|
||
*
|
||
* @return valor de transaccion
|
||
*/
|
||
public String getTransaccion() {
|
||
return transaccion;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de transaccion
|
||
*
|
||
* @param pTransaccion nuevo Valor de transaccion
|
||
*/
|
||
public void setTransaccion(String pTransaccion) {
|
||
transaccion = pTransaccion;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de creacion_cli
|
||
*
|
||
* @return valor de creacion_cli
|
||
*/
|
||
public String getCreacion_cli() {
|
||
return creacion_cli;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de creacion_cli
|
||
*
|
||
* @param pCreacion_cli nuevo Valor de creacion_cli
|
||
*/
|
||
public void setCreacion_cli(String pCreacion_cli) {
|
||
creacion_cli = pCreacion_cli;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de actualizacion_cli
|
||
*
|
||
* @return valor de actualizacion_cli
|
||
*/
|
||
public String getActualizacion_cli() {
|
||
return actualizacion_cli;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de actualizacion_cli
|
||
*
|
||
* @param pActualizacion_cli nuevo Valor de actualizacion_cli
|
||
*/
|
||
public void setActualizacion_cli(String pActualizacion_cli) {
|
||
actualizacion_cli = pActualizacion_cli;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de constancia_consep
|
||
*
|
||
* @return valor de constancia_consep
|
||
*/
|
||
public String getConstancia_consep() {
|
||
return constancia_consep;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de constancia_consep
|
||
*
|
||
* @param pConstancia_consep nuevo Valor de constancia_consep
|
||
*/
|
||
public void setConstancia_consep(String pConstancia_consep) {
|
||
constancia_consep = pConstancia_consep;
|
||
}
|
||
|
||
public boolean equals(Object rhs) {
|
||
if (rhs == null) {
|
||
return false;
|
||
}
|
||
if (!(rhs instanceof TgeneConsepLog)) {
|
||
return false;
|
||
}
|
||
TgeneConsepLog that = (TgeneConsepLog) 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 TgeneConsepLog
|
||
*
|
||
* @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 TgeneConsepLog
|
||
*/
|
||
public Object createInstance() {
|
||
TgeneConsepLog instance = new TgeneConsepLog();
|
||
return instance;
|
||
}
|
||
|
||
/**
|
||
* Clona la entidad TgeneConsepLog
|
||
*
|
||
* @see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
public Object cloneMe() throws CloneNotSupportedException {
|
||
TgeneConsepLog p = (TgeneConsepLog) this.clone();
|
||
return p;
|
||
}
|
||
}
|