380 lines
9.3 KiB
Plaintext
Executable File
380 lines
9.3 KiB
Plaintext
Executable File
package com.fp.persistence.pcustomer.balance;
|
|
|
|
import java.sql.Timestamp;
|
|
import com.fp.dto.hb.Log;
|
|
import java.io.Serializable;
|
|
import javax.persistence.Table;
|
|
import com.fp.dto.hb.HibernateBean;
|
|
import javax.persistence.Version;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.EmbeddedId;
|
|
import com.fp.dto.hb.Cache;
|
|
import javax.persistence.EntityManager;
|
|
import javax.persistence.Column;
|
|
import java.lang.reflect.Field;
|
|
import javax.persistence.Transient;
|
|
import java.sql.Date;
|
|
|
|
/**
|
|
* Clase que implementa la entidad de Hibernate que hace referencia a la tabla
|
|
* TCUSTPERSONBALANCE
|
|
*/
|
|
@Entity(name = "TcustPersonBalance")
|
|
@Table(name = "TCUSTPERSONBALANCE")
|
|
public class TcustPersonBalance extends com.fp.dto.AbstractDataTransport
|
|
implements Serializable, HibernateBean, Cloneable, Cache, 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 TcustPersonBalance
|
|
*/
|
|
@EmbeddedId
|
|
private TcustPersonBalanceKey pk;
|
|
@Column(name = "STATUSCATALOG", nullable = true)
|
|
/**
|
|
* Codigo de catalogo 01 Natural, 02 Juridico
|
|
*/
|
|
private String statuscatalog;
|
|
@Column(name = "STATUSCATALOGCODE", nullable = true)
|
|
/**
|
|
* Codigo de tabla de catalogo 01 Codigo de tabla de tipos de persona
|
|
*/
|
|
private String statuscatalogcode;
|
|
@Column(name = "CURRENCYCODE", nullable = true)
|
|
/**
|
|
* Codigo de moneda
|
|
*/
|
|
private String currencycode;
|
|
@Column(name = "COMPANYCODE", nullable = true)
|
|
/**
|
|
* Codigo de compania
|
|
*/
|
|
private Integer companycode;
|
|
@Column(name = "CODE", nullable = true)
|
|
/**
|
|
* Codigo de imagen.
|
|
*/
|
|
private Integer code;
|
|
@Column(name = "DATEFROM", nullable = true)
|
|
/**
|
|
* Fecha desde la cual esta vigente el registro
|
|
*/
|
|
private Timestamp datefrom;
|
|
@Column(name = "INGRESSUSER", nullable = true)
|
|
/**
|
|
* Codigo de usuario que crea el registro
|
|
*/
|
|
private String ingressuser;
|
|
@Column(name = "MODIFYUSER", nullable = true)
|
|
/**
|
|
* Codigo de usuario que modifica datos del registro
|
|
*/
|
|
private String modifyuser;
|
|
@Version
|
|
@Column(name = "RECORDVERSION", nullable = true)
|
|
/**
|
|
* Optimistic locking del registro
|
|
*/
|
|
private Integer recordversion;
|
|
|
|
/**
|
|
* Contructor por defecto
|
|
*/
|
|
public TcustPersonBalance() {
|
|
}
|
|
|
|
/**
|
|
* Contructor de TcustPersonBalance
|
|
*
|
|
* @param pPk Clave Primaria del entity
|
|
*/
|
|
public TcustPersonBalance(TcustPersonBalanceKey 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 TcustPersonBalance
|
|
*/
|
|
public static TcustPersonBalance find(EntityManager pEntityManager, TcustPersonBalanceKey pKey) throws Exception {
|
|
TcustPersonBalance obj = pEntityManager.find(TcustPersonBalance.class, pKey);
|
|
return obj;
|
|
}
|
|
|
|
/**
|
|
* Entrega la Clave primaria de TcustPersonBalance
|
|
*
|
|
* @return El objeto que referencia a la Clave primaria de
|
|
* TcustPersonBalance
|
|
*/
|
|
public TcustPersonBalanceKey getPk() {
|
|
return pk;
|
|
}
|
|
|
|
/**
|
|
* Fija un nuevo valor a la Clave primaria de TcustPersonBalance
|
|
*
|
|
* @param pPk El objeto que referencia a la nueva Clave primaria de
|
|
* TcustPersonBalance
|
|
*/
|
|
public void setPk(TcustPersonBalanceKey pPk) {
|
|
pk = pPk;
|
|
}
|
|
|
|
/**
|
|
* Obtiene el valor de statuscatalog
|
|
*
|
|
* @return valor de statuscatalog
|
|
*/
|
|
public String getStatuscatalog() {
|
|
return statuscatalog;
|
|
}
|
|
|
|
/**
|
|
* Fija el valor de statuscatalog
|
|
*
|
|
* @param pStatuscatalog nuevo Valor de statuscatalog
|
|
*/
|
|
public void setStatuscatalog(String pStatuscatalog) {
|
|
statuscatalog = pStatuscatalog;
|
|
}
|
|
|
|
/**
|
|
* Obtiene el valor de statuscatalogcode
|
|
*
|
|
* @return valor de statuscatalogcode
|
|
*/
|
|
public String getStatuscatalogcode() {
|
|
return statuscatalogcode;
|
|
}
|
|
|
|
/**
|
|
* Fija el valor de statuscatalogcode
|
|
*
|
|
* @param pStatuscatalogcode nuevo Valor de statuscatalogcode
|
|
*/
|
|
public void setStatuscatalogcode(String pStatuscatalogcode) {
|
|
statuscatalogcode = pStatuscatalogcode;
|
|
}
|
|
|
|
/**
|
|
* Obtiene el valor de currencycode
|
|
*
|
|
* @return valor de currencycode
|
|
*/
|
|
public String getCurrencycode() {
|
|
return currencycode;
|
|
}
|
|
|
|
/**
|
|
* Fija el valor de currencycode
|
|
*
|
|
* @param pCurrencycode nuevo Valor de currencycode
|
|
*/
|
|
public void setCurrencycode(String pCurrencycode) {
|
|
currencycode = pCurrencycode;
|
|
}
|
|
|
|
/**
|
|
* 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 code
|
|
*
|
|
* @return valor de code
|
|
*/
|
|
public Integer getCode() {
|
|
return code;
|
|
}
|
|
|
|
/**
|
|
* Fija el valor de code
|
|
*
|
|
* @param pCode nuevo Valor de code
|
|
*/
|
|
public void setCode(Integer pCode) {
|
|
code = pCode;
|
|
}
|
|
|
|
/**
|
|
* 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 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 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;
|
|
}
|
|
|
|
public boolean equals(Object rhs) {
|
|
if (rhs == null) {
|
|
return false;
|
|
}
|
|
if (!(rhs instanceof TcustPersonBalance)) {
|
|
return false;
|
|
}
|
|
TcustPersonBalance that = (TcustPersonBalance) rhs;
|
|
if (this.getPk() == null || that.getPk() == null) {
|
|
return false;
|
|
}
|
|
return (this.getPk().equals(that.getPk()));
|
|
}
|
|
|
|
/**
|
|
* Implementación del metodo hashCode de la la entidad TcustPersonBalance
|
|
*
|
|
* @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ó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ón de la creación de un bean en blanco TcustPersonBalance
|
|
*/
|
|
public Object createInstance() {
|
|
TcustPersonBalance instance = new TcustPersonBalance();
|
|
instance.setPk(new TcustPersonBalanceKey());
|
|
return instance;
|
|
}
|
|
|
|
/**
|
|
* Clona la entidad TcustPersonBalance
|
|
*
|
|
* @see com.fp.dto.hb.HibernateBean#cloneMe()
|
|
*/
|
|
public Object cloneMe() throws CloneNotSupportedException {
|
|
TcustPersonBalance p = (TcustPersonBalance) this.clone();
|
|
p.setPk((TcustPersonBalanceKey) this.pk.cloneMe());
|
|
return p;
|
|
}
|
|
|
|
public Object getId() {
|
|
return this.pk;
|
|
}
|
|
}
|