822 lines
21 KiB
Plaintext
Executable File
822 lines
21 KiB
Plaintext
Executable File
package com.fp.persistence.pcustomer.gene;
|
||
|
||
import javax.persistence.EmbeddedId;
|
||
import javax.persistence.Entity;
|
||
|
||
import java.sql.Timestamp;
|
||
|
||
import com.fp.dto.hb.Log;
|
||
|
||
import javax.persistence.Column;
|
||
import javax.persistence.EntityManager;
|
||
|
||
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 java.sql.Date;
|
||
|
||
import javax.persistence.NoResultException;
|
||
|
||
import com.fp.general.exception.GeneralException;
|
||
import com.fp.common.helper.Constant;
|
||
|
||
import javax.persistence.Query;
|
||
|
||
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TCUSTPERSONDETAIL*/
|
||
@Entity(name="TcustPersonDetail")
|
||
@Table(name="TCUSTPERSONDETAIL")
|
||
public class TcustPersonDetail extends com.fp.dto.AbstractDataTransport implements Serializable,HibernateBean,Cloneable,Log{
|
||
/**
|
||
* 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 TcustPersonDetail
|
||
*/
|
||
@EmbeddedId
|
||
private TcustPersonDetailKey pk;
|
||
@Version
|
||
@Column(name="RECORDVERSION", nullable=false)
|
||
|
||
/**
|
||
* Optimistic locking del registro
|
||
*/
|
||
private Integer recordversion;
|
||
|
||
@Column(name="DATEFROM", nullable=true)
|
||
|
||
/**
|
||
* Fecha desde la cual esta vigente el registro
|
||
*/
|
||
private Timestamp datefrom;
|
||
|
||
@Column(name="NAME", nullable=false)
|
||
|
||
/**
|
||
* Nombre Legal de la persona
|
||
*/
|
||
private String name;
|
||
|
||
@Column(name="NICKNAME", nullable=true)
|
||
|
||
/**
|
||
* Nombre preferido
|
||
*/
|
||
private String nickname;
|
||
|
||
@Column(name="IDENTIFICATIONCATALOG", nullable=true)
|
||
|
||
/**
|
||
* CED, Cedula, RUC ruc, PAS pasoporte etc.
|
||
*/
|
||
private String identificationcatalog;
|
||
|
||
@Column(name="IDENTIFICATIONCATALOGCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de tabla de catalogo IDENTIFICATION
|
||
*/
|
||
private String identificationcatalogcode;
|
||
|
||
@Column(name="IDENTIFICATION", nullable=false)
|
||
|
||
/**
|
||
* Numero de cedula, ruc, pasaporte, etc..
|
||
*/
|
||
private String identification;
|
||
|
||
@Column(name="INGRESSUSER", nullable=true)
|
||
|
||
/**
|
||
* Codigo de usuario que crea el cliente
|
||
*/
|
||
private String ingressuser;
|
||
|
||
@Column(name="MODIFYUSER", nullable=true)
|
||
|
||
/**
|
||
* Codigo de usuario que modifica datos del cliente
|
||
*/
|
||
private String modifyuser;
|
||
|
||
@Column(name="LANGUAGECODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de idioma
|
||
*/
|
||
private String languagecode;
|
||
|
||
@Column(name="OFFICECODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de oficina en la que se ingreso la persona.
|
||
*/
|
||
private Integer officecode;
|
||
|
||
@Column(name="BRANCHCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de sucursal en la que se ingreso la persona.
|
||
*/
|
||
private Integer branchcode;
|
||
|
||
@Column(name="COMPANYCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de compania al que pertenece la oficina
|
||
*/
|
||
private Integer companycode;
|
||
|
||
@Column(name="PERSONTYPECATALOG", nullable=true)
|
||
|
||
/**
|
||
* Codigo de catalogo 1 Natural, 2 Juridico
|
||
*/
|
||
private String persontypecatalog;
|
||
|
||
@Column(name="PERSONTYPECATALOGCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de tabla de catalogo PERSONTYPE, de tipo de persona
|
||
*/
|
||
private String persontypecatalogcode;
|
||
|
||
@Column(name="REGISTERDATE", nullable=true)
|
||
|
||
/**
|
||
* Fecha de ingreso inicial de la persona.
|
||
*/
|
||
private Date registerdate;
|
||
|
||
@Column(name="INNERSCORE", nullable=true)
|
||
|
||
/**
|
||
* Calificacion interna del banco.
|
||
*/
|
||
private String innerscore;
|
||
|
||
@Column(name="PARTHNERNUMBER", nullable=true)
|
||
|
||
/**
|
||
* Codigo de socio
|
||
*/
|
||
private String parthnernumber;
|
||
|
||
@Column(name="DATEEXPIDENTIFICATION", nullable=true)
|
||
|
||
/**
|
||
* Fecha de caducidad del documento de identidad
|
||
*/
|
||
private Date dateexpidentification;
|
||
|
||
@Column(name="TAXEXEMPT", nullable=true)
|
||
|
||
/**
|
||
* Excento de impuesto
|
||
*/
|
||
private String taxexempt;
|
||
|
||
@Column(name="CLIENTTYPECATALOG", nullable=true)
|
||
|
||
/**
|
||
* Persona natural, Publica Financiera, Privada Financiera
|
||
*/
|
||
private String clienttypecatalog;
|
||
|
||
@Column(name="CLIENTTYPECATALOGCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de tabla de catalogo CLIENTTYPE Tipo de Cliente
|
||
*/
|
||
private String clienttypecatalogcode;
|
||
|
||
@Column(name="ECONOMICSECTORCATALOG", nullable=true)
|
||
|
||
/**
|
||
* Tipos de Sector: Gobierno central, hogares, No residentes , Empresas
|
||
*/
|
||
private String economicsectorcatalog;
|
||
|
||
@Column(name="ECONOMICSECTORCATALOGCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de tabla de catalogo ECONOMICSECTOR Tipo de Sector
|
||
*/
|
||
private String economicsectorcatalogcode;
|
||
|
||
@Column(name="ACTIVITYCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de actividad
|
||
*/
|
||
private String activitycode;
|
||
|
||
@Column(name="ISMIGRATED", nullable=true)
|
||
|
||
/**
|
||
* Y, indica que la informacion actual del cliente proviene de una migracion.
|
||
*/
|
||
private String ismigrated;
|
||
|
||
@Column(name="SBSEMPLOYEE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de empleado de la sbs
|
||
*/
|
||
private String sbsemployee;
|
||
|
||
@Column(name="SBSUSERCODE", nullable=true)
|
||
|
||
/**
|
||
* Codigo de usuario utilizado en la sbs, se utiliza en la integracion con CAS
|
||
*/
|
||
private String sbsusercode;
|
||
|
||
@Column(name="LEGALREPRESENT", nullable=true)
|
||
|
||
/**
|
||
* null
|
||
*/
|
||
private String legalrepresent;
|
||
|
||
@Column(name="LEGALREPRESENTIDENTIFICATION", nullable=true)
|
||
|
||
/**
|
||
* null
|
||
*/
|
||
private String legalrepresentidentification;
|
||
|
||
@Column(name="MILITARYGRADE", nullable=true)
|
||
|
||
/**
|
||
* Catalog del grado del militar en la tabla de cat<61>logos
|
||
*/
|
||
private String militarygrade;
|
||
|
||
@Column(name="MILITARYGRADECODE", nullable=true)
|
||
|
||
/**
|
||
* Catalogcode del grado del militar en la tabla de cat<61>logos
|
||
*/
|
||
private String militarygradecode;
|
||
|
||
@Column(name="SIGN", nullable=true,length = 100000)
|
||
|
||
/**
|
||
* Firma digital
|
||
*/
|
||
private byte[] sign;
|
||
|
||
@Column(name="PICTURE", nullable=true,length = 100000)
|
||
|
||
/**
|
||
* Firma digital
|
||
*/
|
||
private byte[] picture;
|
||
|
||
@Column(name = "PHOTO", nullable = true)
|
||
/**
|
||
* Codigo de imagen
|
||
*/
|
||
private Integer photo;
|
||
|
||
@Column(name="ECONIMICACT", nullable=true)
|
||
|
||
/**
|
||
* Valor de la actividad economica
|
||
*/
|
||
private String econimicact;
|
||
|
||
/**Contructor por defecto*/
|
||
public TcustPersonDetail(){
|
||
}
|
||
/**Contructor de TcustPersonDetail
|
||
@param pPk Clave Primaria del entity
|
||
@param pRecordversion Optimistic locking del registro
|
||
@param pName Nombre Legal de la persona
|
||
@param pIdentification Numero de cedula, ruc, pasaporte, etc..
|
||
*/
|
||
public TcustPersonDetail(TcustPersonDetailKey pPk,Integer pRecordversion,String pName,String pIdentification){
|
||
this();
|
||
pk=pPk;
|
||
recordversion=pRecordversion;
|
||
name=pName;
|
||
identification=pIdentification;
|
||
}
|
||
/**
|
||
* 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 TcustPersonDetail
|
||
*/
|
||
public static TcustPersonDetail find(EntityManager pEntityManager,TcustPersonDetailKey pKey) throws Exception{
|
||
TcustPersonDetail obj = pEntityManager.find(TcustPersonDetail.class,pKey);
|
||
return obj;
|
||
}
|
||
/**Entrega la Clave primaria de TcustPersonDetail
|
||
@return El objeto que referencia a la Clave primaria de TcustPersonDetail
|
||
*/
|
||
public TcustPersonDetailKey getPk(){
|
||
return pk;
|
||
}
|
||
/**Fija un nuevo valor a la Clave primaria de TcustPersonDetail
|
||
@param pPk El objeto que referencia a la nueva Clave primaria de TcustPersonDetail
|
||
*/
|
||
public void setPk(TcustPersonDetailKey pPk){
|
||
pk=pPk;
|
||
}
|
||
/**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 datefrom
|
||
@return valor de datefrom*/
|
||
public Timestamp getDatefrom(){
|
||
return datefrom;
|
||
}
|
||
/**Fija el valor de datefrom
|
||
@param pDatefrom nuevo Valor de datefrom*/
|
||
public void setDatefrom(Timestamp pDatefrom){
|
||
datefrom=pDatefrom;
|
||
}
|
||
|
||
/**Obtiene el valor de name
|
||
@return valor de name*/
|
||
public String getName(){
|
||
return name;
|
||
}
|
||
/**Fija el valor de name
|
||
@param pName nuevo Valor de name*/
|
||
public void setName(String pName){
|
||
name=pName;
|
||
}
|
||
|
||
/**Obtiene el valor de nickname
|
||
@return valor de nickname*/
|
||
public String getNickname(){
|
||
return nickname;
|
||
}
|
||
/**Fija el valor de nickname
|
||
@param pNickname nuevo Valor de nickname*/
|
||
public void setNickname(String pNickname){
|
||
nickname=pNickname;
|
||
}
|
||
|
||
/**Obtiene el valor de identificationcatalog
|
||
@return valor de identificationcatalog*/
|
||
public String getIdentificationcatalog(){
|
||
return identificationcatalog;
|
||
}
|
||
/**Fija el valor de identificationcatalog
|
||
@param pIdentificationcatalog nuevo Valor de identificationcatalog*/
|
||
public void setIdentificationcatalog(String pIdentificationcatalog){
|
||
identificationcatalog=pIdentificationcatalog;
|
||
}
|
||
|
||
/**Obtiene el valor de identificationcatalogcode
|
||
@return valor de identificationcatalogcode*/
|
||
public String getIdentificationcatalogcode(){
|
||
return identificationcatalogcode;
|
||
}
|
||
/**Fija el valor de identificationcatalogcode
|
||
@param pIdentificationcatalogcode nuevo Valor de identificationcatalogcode*/
|
||
public void setIdentificationcatalogcode(String pIdentificationcatalogcode){
|
||
identificationcatalogcode=pIdentificationcatalogcode;
|
||
}
|
||
|
||
/**Obtiene el valor de identification
|
||
@return valor de identification*/
|
||
public String getIdentification(){
|
||
return identification;
|
||
}
|
||
/**Fija el valor de identification
|
||
@param pIdentification nuevo Valor de identification*/
|
||
public void setIdentification(String pIdentification){
|
||
identification=pIdentification;
|
||
}
|
||
|
||
/**Obtiene el valor de ingressuser
|
||
@return valor de ingressuser*/
|
||
public String getIngressuser(){
|
||
return ingressuser;
|
||
}
|
||
/**Fija el valor de ingressuser
|
||
@param pIngressuser nuevo Valor de ingressuser*/
|
||
public void setIngressuser(String pIngressuser){
|
||
ingressuser=pIngressuser;
|
||
}
|
||
|
||
/**Obtiene el valor de modifyuser
|
||
@return valor de modifyuser*/
|
||
public String getModifyuser(){
|
||
return modifyuser;
|
||
}
|
||
/**Fija el valor de modifyuser
|
||
@param pModifyuser nuevo Valor de modifyuser*/
|
||
public void setModifyuser(String pModifyuser){
|
||
modifyuser=pModifyuser;
|
||
}
|
||
|
||
/**Obtiene el valor de languagecode
|
||
@return valor de languagecode*/
|
||
public String getLanguagecode(){
|
||
return languagecode;
|
||
}
|
||
/**Fija el valor de languagecode
|
||
@param pLanguagecode nuevo Valor de languagecode*/
|
||
public void setLanguagecode(String pLanguagecode){
|
||
languagecode=pLanguagecode;
|
||
}
|
||
|
||
/**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 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 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 persontypecatalog
|
||
@return valor de persontypecatalog*/
|
||
public String getPersontypecatalog(){
|
||
return persontypecatalog;
|
||
}
|
||
/**Fija el valor de persontypecatalog
|
||
@param pPersontypecatalog nuevo Valor de persontypecatalog*/
|
||
public void setPersontypecatalog(String pPersontypecatalog){
|
||
persontypecatalog=pPersontypecatalog;
|
||
}
|
||
|
||
/**Obtiene el valor de persontypecatalogcode
|
||
@return valor de persontypecatalogcode*/
|
||
public String getPersontypecatalogcode(){
|
||
return persontypecatalogcode;
|
||
}
|
||
/**Fija el valor de persontypecatalogcode
|
||
@param pPersontypecatalogcode nuevo Valor de persontypecatalogcode*/
|
||
public void setPersontypecatalogcode(String pPersontypecatalogcode){
|
||
persontypecatalogcode=pPersontypecatalogcode;
|
||
}
|
||
|
||
/**Obtiene el valor de registerdate
|
||
@return valor de registerdate*/
|
||
public Date getRegisterdate(){
|
||
return registerdate;
|
||
}
|
||
/**Fija el valor de registerdate
|
||
@param pRegisterdate nuevo Valor de registerdate*/
|
||
public void setRegisterdate(Date pRegisterdate){
|
||
registerdate=pRegisterdate;
|
||
}
|
||
|
||
/**Obtiene el valor de innerscore
|
||
@return valor de innerscore*/
|
||
public String getInnerscore(){
|
||
return innerscore;
|
||
}
|
||
/**Fija el valor de innerscore
|
||
@param pInnerscore nuevo Valor de innerscore*/
|
||
public void setInnerscore(String pInnerscore){
|
||
innerscore=pInnerscore;
|
||
}
|
||
|
||
/**Obtiene el valor de parthnernumber
|
||
@return valor de parthnernumber*/
|
||
public String getParthnernumber(){
|
||
return parthnernumber;
|
||
}
|
||
/**Fija el valor de parthnernumber
|
||
@param pParthnernumber nuevo Valor de parthnernumber*/
|
||
public void setParthnernumber(String pParthnernumber){
|
||
parthnernumber=pParthnernumber;
|
||
}
|
||
|
||
/**Obtiene el valor de dateexpidentification
|
||
@return valor de dateexpidentification*/
|
||
public Date getDateexpidentification(){
|
||
return dateexpidentification;
|
||
}
|
||
/**Fija el valor de dateexpidentification
|
||
@param pDateexpidentification nuevo Valor de dateexpidentification*/
|
||
public void setDateexpidentification(Date pDateexpidentification){
|
||
dateexpidentification=pDateexpidentification;
|
||
}
|
||
|
||
/**Obtiene el valor de taxexempt
|
||
@return valor de taxexempt*/
|
||
public String getTaxexempt(){
|
||
return taxexempt;
|
||
}
|
||
/**Fija el valor de taxexempt
|
||
@param pTaxexempt nuevo Valor de taxexempt*/
|
||
public void setTaxexempt(String pTaxexempt){
|
||
taxexempt=pTaxexempt;
|
||
}
|
||
|
||
/**Obtiene el valor de clienttypecatalog
|
||
@return valor de clienttypecatalog*/
|
||
public String getClienttypecatalog(){
|
||
return clienttypecatalog;
|
||
}
|
||
/**Fija el valor de clienttypecatalog
|
||
@param pClienttypecatalog nuevo Valor de clienttypecatalog*/
|
||
public void setClienttypecatalog(String pClienttypecatalog){
|
||
clienttypecatalog=pClienttypecatalog;
|
||
}
|
||
|
||
/**Obtiene el valor de clienttypecatalogcode
|
||
@return valor de clienttypecatalogcode*/
|
||
public String getClienttypecatalogcode(){
|
||
return clienttypecatalogcode;
|
||
}
|
||
/**Fija el valor de clienttypecatalogcode
|
||
@param pClienttypecatalogcode nuevo Valor de clienttypecatalogcode*/
|
||
public void setClienttypecatalogcode(String pClienttypecatalogcode){
|
||
clienttypecatalogcode=pClienttypecatalogcode;
|
||
}
|
||
|
||
/**Obtiene el valor de economicsectorcatalog
|
||
@return valor de economicsectorcatalog*/
|
||
public String getEconomicsectorcatalog(){
|
||
return economicsectorcatalog;
|
||
}
|
||
/**Fija el valor de economicsectorcatalog
|
||
@param pEconomicsectorcatalog nuevo Valor de economicsectorcatalog*/
|
||
public void setEconomicsectorcatalog(String pEconomicsectorcatalog){
|
||
economicsectorcatalog=pEconomicsectorcatalog;
|
||
}
|
||
|
||
/**Obtiene el valor de economicsectorcatalogcode
|
||
@return valor de economicsectorcatalogcode*/
|
||
public String getEconomicsectorcatalogcode(){
|
||
return economicsectorcatalogcode;
|
||
}
|
||
/**Fija el valor de economicsectorcatalogcode
|
||
@param pEconomicsectorcatalogcode nuevo Valor de economicsectorcatalogcode*/
|
||
public void setEconomicsectorcatalogcode(String pEconomicsectorcatalogcode){
|
||
economicsectorcatalogcode=pEconomicsectorcatalogcode;
|
||
}
|
||
|
||
/**Obtiene el valor de activitycode
|
||
@return valor de activitycode*/
|
||
public String getActivitycode(){
|
||
return activitycode;
|
||
}
|
||
/**Fija el valor de activitycode
|
||
@param pActivitycode nuevo Valor de activitycode*/
|
||
public void setActivitycode(String pActivitycode){
|
||
activitycode=pActivitycode;
|
||
}
|
||
|
||
/**Obtiene el valor de ismigrated
|
||
@return valor de ismigrated*/
|
||
public String getIsmigrated(){
|
||
return ismigrated;
|
||
}
|
||
/**Fija el valor de ismigrated
|
||
@param pIsmigrated nuevo Valor de ismigrated*/
|
||
public void setIsmigrated(String pIsmigrated){
|
||
ismigrated=pIsmigrated;
|
||
}
|
||
|
||
/**Obtiene el valor de sbsemployee
|
||
@return valor de sbsemployee*/
|
||
public String getSbsemployee(){
|
||
return sbsemployee;
|
||
}
|
||
/**Fija el valor de sbsemployee
|
||
@param pSbsemployee nuevo Valor de sbsemployee*/
|
||
public void setSbsemployee(String pSbsemployee){
|
||
sbsemployee=pSbsemployee;
|
||
}
|
||
|
||
/**Obtiene el valor de sbsusercode
|
||
@return valor de sbsusercode*/
|
||
public String getSbsusercode(){
|
||
return sbsusercode;
|
||
}
|
||
/**Fija el valor de sbsusercode
|
||
@param pSbsusercode nuevo Valor de sbsusercode*/
|
||
public void setSbsusercode(String pSbsusercode){
|
||
sbsusercode=pSbsusercode;
|
||
}
|
||
|
||
/**Obtiene el valor de legalrepresent
|
||
@return valor de legalrepresent*/
|
||
public String getLegalrepresent(){
|
||
return legalrepresent;
|
||
}
|
||
/**Fija el valor de legalrepresent
|
||
@param pLegalrepresent nuevo Valor de legalrepresent*/
|
||
public void setLegalrepresent(String pLegalrepresent){
|
||
legalrepresent=pLegalrepresent;
|
||
}
|
||
|
||
/**Obtiene el valor de legalrepresentidentification
|
||
@return valor de legalrepresentidentification*/
|
||
public String getLegalrepresentidentification(){
|
||
return legalrepresentidentification;
|
||
}
|
||
/**Fija el valor de legalrepresentidentification
|
||
@param pLegalrepresentidentification nuevo Valor de legalrepresentidentification*/
|
||
public void setLegalrepresentidentification(String pLegalrepresentidentification){
|
||
legalrepresentidentification=pLegalrepresentidentification;
|
||
}
|
||
|
||
/**Obtiene el valor de militarygrade
|
||
@return valor de militarygrade*/
|
||
public String getMilitarygrade(){
|
||
return militarygrade;
|
||
}
|
||
/**Fija el valor de militarygrade
|
||
@param pMilitarygrade nuevo Valor de militarygrade*/
|
||
public void setMilitarygrade(String pMilitarygrade){
|
||
militarygrade=pMilitarygrade;
|
||
}
|
||
|
||
/**Obtiene el valor de militarygradecode
|
||
@return valor de militarygradecode*/
|
||
public String getMilitarygradecode(){
|
||
return militarygradecode;
|
||
}
|
||
/**Fija el valor de militarygradecode
|
||
@param pMilitarygradecode nuevo Valor de militarygradecode*/
|
||
public void setMilitarygradecode(String pMilitarygradecode){
|
||
militarygradecode=pMilitarygradecode;
|
||
}
|
||
|
||
|
||
/**Obtiene el valor de sign
|
||
@return valor de sign*/
|
||
public byte[] getSign() {
|
||
return sign;
|
||
}
|
||
/**Fija el valor de sign
|
||
@param pMilitarygradecode nuevo Valor de sign*/
|
||
public void setSign(byte[] sign) {
|
||
this.sign = sign;
|
||
}
|
||
|
||
/**Obtiene el valor de picture
|
||
@return valor de picture*/
|
||
public byte[] getPicture() {
|
||
return picture;
|
||
}
|
||
/**Fija el valor de picture
|
||
@param pMilitarygradecode nuevo Valor de picture*/
|
||
public void setPicture(byte[] picture) {
|
||
this.picture = picture;
|
||
}
|
||
|
||
/**Obtiene el valor de photo
|
||
@return valor de photo*/
|
||
public Integer getPhoto() {
|
||
return photo;
|
||
}
|
||
/**Fija el valor de v
|
||
@param pMilitarygradecode nuevo Valor de photo*/
|
||
public void setPhoto(Integer photo) {
|
||
this.photo = photo;
|
||
}
|
||
|
||
|
||
/**Obtiene el valor de actividad economica
|
||
@return valor de econimicact*/
|
||
public String getEconimicact() {
|
||
return econimicact;
|
||
}
|
||
/**Fija el valor de actividad economica
|
||
@param pEconimicact nuevo Valor de econimicact*/
|
||
public void setEconimicact(String pEconimicact){
|
||
this.econimicact=pEconimicact;
|
||
}
|
||
|
||
|
||
public boolean equals(Object rhs){
|
||
if (rhs == null)return false;
|
||
if (! (rhs instanceof TcustPersonDetail))return false;
|
||
TcustPersonDetail that = (TcustPersonDetail) rhs;
|
||
if (this.getPk() == null || that.getPk() == null)
|
||
return false;
|
||
return (this.getPk().equals(that.getPk()));
|
||
}
|
||
/**Implementacion del metodo hashCode de la la entidad TcustPersonDetail
|
||
@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 TcustPersonDetail
|
||
*/
|
||
public Object createInstance(){
|
||
TcustPersonDetail instance=new TcustPersonDetail();
|
||
instance.setPk(new TcustPersonDetailKey());
|
||
return instance;
|
||
}
|
||
/**Clona la entidad TcustPersonDetail
|
||
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
public Object cloneMe() throws CloneNotSupportedException{
|
||
TcustPersonDetail p=(TcustPersonDetail)this.clone();
|
||
p.setPk((TcustPersonDetailKey)this.pk.cloneMe());
|
||
return p;
|
||
}
|
||
public Object getId() {
|
||
return this.pk;
|
||
}
|
||
|
||
public static TcustPersonDetail find(EntityManager pEntityManager, Integer pPersonCode)
|
||
throws Exception
|
||
{
|
||
TcustPersonDetail tcustPersonDetail = null;
|
||
Query qry = pEntityManager.createQuery("from TcustPersonDetail tpd where tpd.pk.personcode = :personcode and tpd.pk.dateto = :dateto");
|
||
|
||
qry.setParameter("personcode", pPersonCode);
|
||
qry.setParameter("dateto", Constant.getDefaultExpiryDate());
|
||
try
|
||
{
|
||
tcustPersonDetail = (TcustPersonDetail)qry.getSingleResult();
|
||
}
|
||
catch (NoResultException e)
|
||
{
|
||
throw new GeneralException("CUST-0001", "PERSONA NO DEFINIDA EN TCUSTPERSONDETAIL: PERSONCODE:{0}", new Object[] { pPersonCode });
|
||
}
|
||
return tcustPersonDetail;
|
||
}
|
||
}
|