547 lines
14 KiB
Plaintext
Executable File
547 lines
14 KiB
Plaintext
Executable File
package com.fp.persistence.pcustomer.people;
|
||
|
||
import java.io.Serializable;
|
||
import java.lang.reflect.Field;
|
||
import java.math.BigDecimal;
|
||
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 TCUSTPEOPLEOTHERASSETS
|
||
*/
|
||
@Entity(name = "TcustPeopleOtherAssets")
|
||
@Table(name = "TCUSTPEOPLEOTHERASSETS")
|
||
public class TcustPeopleOtherAssets 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 TcustPeopleOtherAssets
|
||
*/
|
||
@EmbeddedId
|
||
@GenericGenerator(name = "seq_id", strategy = "com.fp.general.keygen.SubSequenceKey", parameters = {
|
||
@Parameter(name = "sql", value = "select coalesce(max(ASSETSSEQUENCE),0)+1 from TCUSTPEOPLEOTHERASSETS where personcode=:code"),
|
||
@Parameter(name = "type", value = "java.lang.Integer"), @Parameter(name = "param", value = "code,pk.personcode"),
|
||
@Parameter(name = "field", value = "assetssequence") })
|
||
@GeneratedValue(generator = "seq_id")
|
||
private TcustPeopleOtherAssetsKey pk;
|
||
|
||
@Column(name = "DATEFROM", nullable = true)
|
||
/**
|
||
* Fecha desde la cual esta vigente el registro
|
||
*/
|
||
private Timestamp datefrom;
|
||
|
||
@Version
|
||
@Column(name = "RECORDVERSION", nullable = true)
|
||
/**
|
||
* Optimistic locking del registro
|
||
*/
|
||
private Integer recordversion;
|
||
|
||
@Column(name = "PROPERTYTYPECATALOG", nullable = true)
|
||
/**
|
||
* Codigo de catalogo 1, CASA, 2 OFICINA, 3 JOYAS
|
||
*/
|
||
private String propertytypecatalog;
|
||
|
||
@Column(name = "PROPERTYTYPECATALOGCODE", nullable = true)
|
||
/**
|
||
* Codigo de tabla de catalogo PROPERTYTYPE, DEL TIPO DE BIEN
|
||
*/
|
||
private String propertytypecatalogcode;
|
||
|
||
@Column(name = "CURRENCYCODE", nullable = true)
|
||
/**
|
||
* Codigo de moneda
|
||
*/
|
||
private String currencycode;
|
||
|
||
@Column(name = "ASSESSMENT", nullable = true)
|
||
/**
|
||
* Valor del avaluo del bien
|
||
*/
|
||
private BigDecimal assessment;
|
||
|
||
@Column(name = "ASSESSMENTDATE", nullable = true)
|
||
/**
|
||
* Fecha de avaluo.
|
||
*/
|
||
private Date assessmentdate;
|
||
|
||
@Column(name = "MORTGAGEAMOUNT", nullable = true)
|
||
/**
|
||
* Monto original de la hipoteca
|
||
*/
|
||
private BigDecimal mortgageamount;
|
||
|
||
@Column(name = "MORTGAGEDATE", nullable = true)
|
||
/**
|
||
* Fecha de la hipoteca
|
||
*/
|
||
private Date mortgagedate;
|
||
|
||
@Column(name = "MORTGAGEBALANCE", nullable = true)
|
||
/**
|
||
* Saldo de la hipoteca
|
||
*/
|
||
private BigDecimal mortgagebalance;
|
||
|
||
@Column(name = "MORTGAGEPERSONCODE", nullable = true)
|
||
/**
|
||
* Codigo de persona a la que esta hipotecado el bien
|
||
*/
|
||
private Integer mortgagepersoncode;
|
||
|
||
@Column(name = "MORTGAGENAME", nullable = true)
|
||
/**
|
||
* Nombre de la entidad poseedora de la hipoteca
|
||
*/
|
||
private String mortgagename;
|
||
|
||
@Column(name = "REMARK", nullable = true)
|
||
/**
|
||
* Comentario
|
||
*/
|
||
private String remark;
|
||
|
||
@Column(name = "INGRESSUSERCODE", nullable = true)
|
||
/**
|
||
* Codigo de usuario
|
||
*/
|
||
private String ingressusercode;
|
||
|
||
@Column(name = "MODIFYUSERCODE", nullable = true)
|
||
/**
|
||
* Codigo de usuario
|
||
*/
|
||
private String modifyusercode;
|
||
|
||
/**
|
||
* Contructor por defecto
|
||
*/
|
||
public TcustPeopleOtherAssets() {
|
||
}
|
||
|
||
/**
|
||
* Contructor de TcustPeopleOtherAssets
|
||
*
|
||
* @param pPk Clave Primaria del entity
|
||
*/
|
||
public TcustPeopleOtherAssets(TcustPeopleOtherAssetsKey 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 TcustPeopleOtherAssets
|
||
*/
|
||
public static TcustPeopleOtherAssets find(EntityManager pEntityManager, TcustPeopleOtherAssetsKey pKey) throws Exception {
|
||
TcustPeopleOtherAssets obj = pEntityManager.find(TcustPeopleOtherAssets.class, pKey);
|
||
return obj;
|
||
}
|
||
|
||
/**
|
||
* Entrega la Clave primaria de TcustPeopleOtherAssets
|
||
*
|
||
* @return El objeto que referencia a la Clave primaria de TcustPeopleOtherAssets
|
||
*/
|
||
public TcustPeopleOtherAssetsKey getPk() {
|
||
return this.pk;
|
||
}
|
||
|
||
/**
|
||
* Fija un nuevo valor a la Clave primaria de TcustPeopleOtherAssets
|
||
*
|
||
* @param pPk El objeto que referencia a la nueva Clave primaria de TcustPeopleOtherAssets
|
||
*/
|
||
public void setPk(TcustPeopleOtherAssetsKey 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 propertytypecatalog
|
||
*
|
||
* @return valor de propertytypecatalog
|
||
*/
|
||
public String getPropertytypecatalog() {
|
||
return this.propertytypecatalog;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de propertytypecatalog
|
||
*
|
||
* @param pPropertytypecatalog nuevo Valor de propertytypecatalog
|
||
*/
|
||
public void setPropertytypecatalog(String pPropertytypecatalog) {
|
||
this.propertytypecatalog = pPropertytypecatalog;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de propertytypecatalogcode
|
||
*
|
||
* @return valor de propertytypecatalogcode
|
||
*/
|
||
public String getPropertytypecatalogcode() {
|
||
return this.propertytypecatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de propertytypecatalogcode
|
||
*
|
||
* @param pPropertytypecatalogcode nuevo Valor de propertytypecatalogcode
|
||
*/
|
||
public void setPropertytypecatalogcode(String pPropertytypecatalogcode) {
|
||
this.propertytypecatalogcode = pPropertytypecatalogcode;
|
||
}
|
||
|
||
/**
|
||
* 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 assessment
|
||
*
|
||
* @return valor de assessment
|
||
*/
|
||
public BigDecimal getAssessment() {
|
||
return this.assessment;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de assessment
|
||
*
|
||
* @param pAssessment nuevo Valor de assessment
|
||
*/
|
||
public void setAssessment(BigDecimal pAssessment) {
|
||
this.assessment = pAssessment;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de assessmentdate
|
||
*
|
||
* @return valor de assessmentdate
|
||
*/
|
||
public Date getAssessmentdate() {
|
||
return this.assessmentdate;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de assessmentdate
|
||
*
|
||
* @param pAssessmentdate nuevo Valor de assessmentdate
|
||
*/
|
||
public void setAssessmentdate(Date pAssessmentdate) {
|
||
this.assessmentdate = pAssessmentdate;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de mortgageamount
|
||
*
|
||
* @return valor de mortgageamount
|
||
*/
|
||
public BigDecimal getMortgageamount() {
|
||
return this.mortgageamount;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de mortgageamount
|
||
*
|
||
* @param pMortgageamount nuevo Valor de mortgageamount
|
||
*/
|
||
public void setMortgageamount(BigDecimal pMortgageamount) {
|
||
this.mortgageamount = pMortgageamount;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de mortgagedate
|
||
*
|
||
* @return valor de mortgagedate
|
||
*/
|
||
public Date getMortgagedate() {
|
||
return this.mortgagedate;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de mortgagedate
|
||
*
|
||
* @param pMortgagedate nuevo Valor de mortgagedate
|
||
*/
|
||
public void setMortgagedate(Date pMortgagedate) {
|
||
this.mortgagedate = pMortgagedate;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de mortgagebalance
|
||
*
|
||
* @return valor de mortgagebalance
|
||
*/
|
||
public BigDecimal getMortgagebalance() {
|
||
return this.mortgagebalance;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de mortgagebalance
|
||
*
|
||
* @param pMortgagebalance nuevo Valor de mortgagebalance
|
||
*/
|
||
public void setMortgagebalance(BigDecimal pMortgagebalance) {
|
||
this.mortgagebalance = pMortgagebalance;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de mortgagepersoncode
|
||
*
|
||
* @return valor de mortgagepersoncode
|
||
*/
|
||
public Integer getMortgagepersoncode() {
|
||
return this.mortgagepersoncode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de mortgagepersoncode
|
||
*
|
||
* @param pMortgagepersoncode nuevo Valor de mortgagepersoncode
|
||
*/
|
||
public void setMortgagepersoncode(Integer pMortgagepersoncode) {
|
||
this.mortgagepersoncode = pMortgagepersoncode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de mortgagename
|
||
*
|
||
* @return valor de mortgagename
|
||
*/
|
||
public String getMortgagename() {
|
||
return this.mortgagename;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de mortgagename
|
||
*
|
||
* @param pMortgagename nuevo Valor de mortgagename
|
||
*/
|
||
public void setMortgagename(String pMortgagename) {
|
||
this.mortgagename = pMortgagename;
|
||
}
|
||
|
||
/**
|
||
* 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;
|
||
}
|
||
|
||
/**
|
||
* 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;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object rhs) {
|
||
if (rhs == null) {
|
||
return false;
|
||
}
|
||
if (!(rhs instanceof TcustPeopleOtherAssets)) {
|
||
return false;
|
||
}
|
||
TcustPeopleOtherAssets that = (TcustPeopleOtherAssets) 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 TcustPeopleOtherAssets
|
||
*
|
||
* @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 TcustPeopleOtherAssets
|
||
*/
|
||
@Override
|
||
public Object createInstance() {
|
||
TcustPeopleOtherAssets instance = new TcustPeopleOtherAssets();
|
||
instance.setPk(new TcustPeopleOtherAssetsKey());
|
||
return instance;
|
||
}
|
||
|
||
/**
|
||
* Clona la entidad TcustPeopleOtherAssets
|
||
*
|
||
* @see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
@Override
|
||
public Object cloneMe() throws CloneNotSupportedException {
|
||
TcustPeopleOtherAssets p = (TcustPeopleOtherAssets) this.clone();
|
||
p.setPk((TcustPeopleOtherAssetsKey) this.pk.cloneMe());
|
||
return p;
|
||
}
|
||
|
||
public Object getId() {
|
||
return this.pk;
|
||
}
|
||
}
|