535 lines
14 KiB
Plaintext
Executable File
535 lines
14 KiB
Plaintext
Executable File
package com.fp.persistence.pcustomer.gene;
|
||
|
||
import java.io.Serializable;
|
||
import java.lang.reflect.Field;
|
||
import java.sql.Date;
|
||
import java.sql.Timestamp;
|
||
|
||
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;
|
||
import com.fp.dto.hb.Log;
|
||
|
||
/**
|
||
* Clase que implementa la entidad de Hibernate que hace referencia a la tabla
|
||
* TCUSTPERSONBANKREFERENCE
|
||
*/
|
||
@Entity(name = "TcustPersonBankReference")
|
||
@Table(name = "TCUSTPERSONBANKREFERENCE")
|
||
public class TcustPersonBankReference 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 TcustPersonBankReference
|
||
*/
|
||
@EmbeddedId
|
||
@GenericGenerator(name = "seq_id", strategy = "com.fp.general.keygen.SubSequenceKey", parameters = {
|
||
@Parameter(name = "sql", value = "select coalesce(max(REFERENCESEQUENCE),0)+1 from TCUSTPERSONBANKREFERENCE where personcode=:code"),
|
||
@Parameter(name = "type", value = "java.lang.Integer"),
|
||
@Parameter(name = "param", value = "code,pk.personcode"),
|
||
@Parameter(name = "field", value = "referencesequence")})
|
||
@GeneratedValue(generator = "seq_id")
|
||
private TcustPersonBankReferenceKey pk;
|
||
@Column(name = "DATEFROM", nullable = true)
|
||
/**
|
||
* Fecha desde la cual esta vigente el registro del telefono
|
||
*/
|
||
private Timestamp datefrom;
|
||
@Version
|
||
@Column(name = "RECORDVERSION", nullable = true)
|
||
/**
|
||
* Optimistic locking del registro
|
||
*/
|
||
private Integer recordversion;
|
||
@Column(name = "INGRESSUSERCODE", nullable = true)
|
||
/**
|
||
* Codigo de usuario
|
||
*/
|
||
private String ingressusercode;
|
||
@Column(name = "MODIFYUSERCODE", nullable = true)
|
||
/**
|
||
* Codigo de usuario
|
||
*/
|
||
private String modifyusercode;
|
||
@Column(name = "BANKPERSONCODE", nullable = true)
|
||
/**
|
||
* Codigo de persona asociada al banco de referencia de la persona
|
||
*/
|
||
private Integer bankpersoncode;
|
||
@Column(name = "NAME", nullable = true)
|
||
/**
|
||
* Nombre de la institucion fincniera asociada a la cuenta de referencia
|
||
*/
|
||
private String name;
|
||
@Column(name = "ACCOUNTTYPECATALOG", nullable = true)
|
||
/**
|
||
* Codigo de catalogo 1 Corriente, 2 Ahorro
|
||
*/
|
||
private String accounttypecatalog;
|
||
@Column(name = "ACCOUNTTYPECATALOGCODE", nullable = true)
|
||
/**
|
||
* Codigo de tabla de catalogo ACCOUNTTYPE de tipo de cuenta
|
||
*/
|
||
private String accounttypecatalogcode;
|
||
@Column(name = "ACCOUNTNUMBER", nullable = true)
|
||
/**
|
||
* Numero de cuenta, de referencia bancaria
|
||
*/
|
||
private String accountnumber;
|
||
@Column(name = "CURRENCYCODE", nullable = true)
|
||
/**
|
||
* Codigo de moneda
|
||
*/
|
||
private String currencycode;
|
||
@Column(name = "FIGURESNUMBER", nullable = true)
|
||
/**
|
||
* Numero de cifras de manejo
|
||
*/
|
||
private Integer figuresnumber;
|
||
@Column(name = "FIGURESCATALOG", nullable = true)
|
||
/**
|
||
* Codigo de catalogo 1 Altas, 2 medias, 3 bajas
|
||
*/
|
||
private String figurescatalog;
|
||
@Column(name = "FIGURESCATALOGCODE", nullable = true)
|
||
/**
|
||
* Codigo de tabla de catalogo FIGURES cifras de manejo
|
||
*/
|
||
private String figurescatalogcode;
|
||
@Column(name = "OPENINGDATE", nullable = true)
|
||
/**
|
||
* Fecha de apertura de la cuenta
|
||
*/
|
||
private Date openingdate;
|
||
@Column(name = "REMARK", nullable = true)
|
||
/**
|
||
* Observaciones
|
||
*/
|
||
private String remark;
|
||
|
||
/**
|
||
* Contructor por defecto
|
||
*/
|
||
public TcustPersonBankReference() {
|
||
}
|
||
|
||
/**
|
||
* Contructor de TcustPersonBankReference
|
||
*
|
||
* @param pPk Clave Primaria del entity
|
||
*/
|
||
public TcustPersonBankReference(TcustPersonBankReferenceKey pPk) {
|
||
this();
|
||
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 TcustPersonBankReference
|
||
*/
|
||
public static TcustPersonBankReference find(EntityManager pEntityManager, TcustPersonBankReferenceKey pKey) throws Exception {
|
||
TcustPersonBankReference obj = pEntityManager.find(TcustPersonBankReference.class, pKey);
|
||
return obj;
|
||
}
|
||
|
||
/**
|
||
* Entrega la Clave primaria de TcustPersonBankReference
|
||
*
|
||
* @return El objeto que referencia a la Clave primaria de
|
||
* TcustPersonBankReference
|
||
*/
|
||
public TcustPersonBankReferenceKey getPk() {
|
||
return this.pk;
|
||
}
|
||
|
||
/**
|
||
* Fija un nuevo valor a la Clave primaria de TcustPersonBankReference
|
||
*
|
||
* @param pPk El objeto que referencia a la nueva Clave primaria de
|
||
* TcustPersonBankReference
|
||
*/
|
||
public void setPk(TcustPersonBankReferenceKey pPk) {
|
||
this.pk = pPk;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de datefrom
|
||
*
|
||
* @return valor de datefrom
|
||
*/
|
||
public Timestamp getDatefrom() {
|
||
return this.datefrom;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de datefrom
|
||
*
|
||
* @param pDatefrom nuevo Valor de datefrom
|
||
*/
|
||
public void setDatefrom(Timestamp pDatefrom) {
|
||
this.datefrom = pDatefrom;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de recordversion
|
||
*
|
||
* @return valor de recordversion
|
||
*/
|
||
public Integer getRecordversion() {
|
||
return this.recordversion;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de recordversion
|
||
*
|
||
* @param pRecordversion nuevo Valor de recordversion
|
||
*/
|
||
public void setRecordversion(Integer pRecordversion) {
|
||
this.recordversion = pRecordversion;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de ingressusercode
|
||
*
|
||
* @return valor de ingressusercode
|
||
*/
|
||
public String getIngressusercode() {
|
||
return this.ingressusercode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de ingressusercode
|
||
*
|
||
* @param pIngressusercode nuevo Valor de ingressusercode
|
||
*/
|
||
public void setIngressusercode(String pIngressusercode) {
|
||
this.ingressusercode = pIngressusercode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de modifyusercode
|
||
*
|
||
* @return valor de modifyusercode
|
||
*/
|
||
public String getModifyusercode() {
|
||
return this.modifyusercode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de modifyusercode
|
||
*
|
||
* @param pModifyusercode nuevo Valor de modifyusercode
|
||
*/
|
||
public void setModifyusercode(String pModifyusercode) {
|
||
this.modifyusercode = pModifyusercode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de bankpersoncode
|
||
*
|
||
* @return valor de bankpersoncode
|
||
*/
|
||
public Integer getBankpersoncode() {
|
||
return this.bankpersoncode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de bankpersoncode
|
||
*
|
||
* @param pBankpersoncode nuevo Valor de bankpersoncode
|
||
*/
|
||
public void setBankpersoncode(Integer pBankpersoncode) {
|
||
this.bankpersoncode = pBankpersoncode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de name
|
||
*
|
||
* @return valor de name
|
||
*/
|
||
public String getName() {
|
||
return this.name;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de name
|
||
*
|
||
* @param pName nuevo Valor de name
|
||
*/
|
||
public void setName(String pName) {
|
||
this.name = pName;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de accounttypecatalog
|
||
*
|
||
* @return valor de accounttypecatalog
|
||
*/
|
||
public String getAccounttypecatalog() {
|
||
return this.accounttypecatalog;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de accounttypecatalog
|
||
*
|
||
* @param pAccounttypecatalog nuevo Valor de accounttypecatalog
|
||
*/
|
||
public void setAccounttypecatalog(String pAccounttypecatalog) {
|
||
this.accounttypecatalog = pAccounttypecatalog;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de accounttypecatalogcode
|
||
*
|
||
* @return valor de accounttypecatalogcode
|
||
*/
|
||
public String getAccounttypecatalogcode() {
|
||
return this.accounttypecatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de accounttypecatalogcode
|
||
*
|
||
* @param pAccounttypecatalogcode nuevo Valor de accounttypecatalogcode
|
||
*/
|
||
public void setAccounttypecatalogcode(String pAccounttypecatalogcode) {
|
||
this.accounttypecatalogcode = pAccounttypecatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de accountnumber
|
||
*
|
||
* @return valor de accountnumber
|
||
*/
|
||
public String getAccountnumber() {
|
||
return this.accountnumber;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de accountnumber
|
||
*
|
||
* @param pAccountnumber nuevo Valor de accountnumber
|
||
*/
|
||
public void setAccountnumber(String pAccountnumber) {
|
||
this.accountnumber = pAccountnumber;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de currencycode
|
||
*
|
||
* @return valor de currencycode
|
||
*/
|
||
public String getCurrencycode() {
|
||
return this.currencycode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de currencycode
|
||
*
|
||
* @param pCurrencycode nuevo Valor de currencycode
|
||
*/
|
||
public void setCurrencycode(String pCurrencycode) {
|
||
this.currencycode = pCurrencycode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de figuresnumber
|
||
*
|
||
* @return valor de figuresnumber
|
||
*/
|
||
public Integer getFiguresnumber() {
|
||
return this.figuresnumber;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de figuresnumber
|
||
*
|
||
* @param pFiguresnumber nuevo Valor de figuresnumber
|
||
*/
|
||
public void setFiguresnumber(Integer pFiguresnumber) {
|
||
this.figuresnumber = pFiguresnumber;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de figurescatalog
|
||
*
|
||
* @return valor de figurescatalog
|
||
*/
|
||
public String getFigurescatalog() {
|
||
return this.figurescatalog;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de figurescatalog
|
||
*
|
||
* @param pFigurescatalog nuevo Valor de figurescatalog
|
||
*/
|
||
public void setFigurescatalog(String pFigurescatalog) {
|
||
this.figurescatalog = pFigurescatalog;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de figurescatalogcode
|
||
*
|
||
* @return valor de figurescatalogcode
|
||
*/
|
||
public String getFigurescatalogcode() {
|
||
return this.figurescatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de figurescatalogcode
|
||
*
|
||
* @param pFigurescatalogcode nuevo Valor de figurescatalogcode
|
||
*/
|
||
public void setFigurescatalogcode(String pFigurescatalogcode) {
|
||
this.figurescatalogcode = pFigurescatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de openingdate
|
||
*
|
||
* @return valor de openingdate
|
||
*/
|
||
public Date getOpeningdate() {
|
||
return this.openingdate;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de openingdate
|
||
*
|
||
* @param pOpeningdate nuevo Valor de openingdate
|
||
*/
|
||
public void setOpeningdate(Date pOpeningdate) {
|
||
this.openingdate = pOpeningdate;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de remark
|
||
*
|
||
* @return valor de remark
|
||
*/
|
||
public String getRemark() {
|
||
return this.remark;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de remark
|
||
*
|
||
* @param pRemark nuevo Valor de remark
|
||
*/
|
||
public void setRemark(String pRemark) {
|
||
this.remark = pRemark;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object rhs) {
|
||
if (rhs == null) {
|
||
return false;
|
||
}
|
||
if (!(rhs instanceof TcustPersonBankReference)) {
|
||
return false;
|
||
}
|
||
TcustPersonBankReference that = (TcustPersonBankReference) 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
|
||
* TcustPersonBankReference
|
||
*
|
||
* @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
|
||
* TcustPersonBankReference
|
||
*/
|
||
@Override
|
||
public Object createInstance() {
|
||
TcustPersonBankReference instance = new TcustPersonBankReference();
|
||
instance.setPk(new TcustPersonBankReferenceKey());
|
||
return instance;
|
||
}
|
||
|
||
/**
|
||
* Clona la entidad TcustPersonBankReference
|
||
*
|
||
* @see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
@Override
|
||
public Object cloneMe() throws CloneNotSupportedException {
|
||
TcustPersonBankReference p = (TcustPersonBankReference) this.clone();
|
||
p.setPk((TcustPersonBankReferenceKey) this.pk.cloneMe());
|
||
return p;
|
||
}
|
||
|
||
public Object getId() {
|
||
return this.pk;
|
||
}
|
||
}
|