663 lines
17 KiB
Plaintext
Executable File
663 lines
17 KiB
Plaintext
Executable File
package com.fp.persistence.pcustomer.company;
|
||
|
||
import java.sql.Timestamp;
|
||
import java.io.Serializable;
|
||
import javax.persistence.Table;
|
||
import java.math.BigDecimal;
|
||
import com.fp.dto.hb.HibernateBean;
|
||
import com.fp.dto.hb.Log;
|
||
import javax.persistence.Version;
|
||
import javax.persistence.Entity;
|
||
import javax.persistence.EmbeddedId;
|
||
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
|
||
* TCUSTCOMPANYFINANCIAL
|
||
*/
|
||
@Entity(name = "TcustCompanyFinancial")
|
||
@Table(name = "TCUSTCOMPANYFINANCIAL")
|
||
public class TcustCompanyFinancial 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 TcustCompanyFinancial
|
||
*/
|
||
@EmbeddedId
|
||
private TcustCompanyFinancialKey pk;
|
||
@Column(name = "CURRENCYCODE", nullable = true)
|
||
/**
|
||
* Codigo de moneda
|
||
*/
|
||
private String currencycode;
|
||
@Column(name = "DATEFROM", nullable = false)
|
||
/**
|
||
* 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 = "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 = "SITUATIONDATE", nullable = true)
|
||
/**
|
||
* Fecha a la cual se tiene actualizada la situacion financiera de la
|
||
* compania.
|
||
*/
|
||
private Date situationdate;
|
||
@Column(name = "SALESAMOUNT", nullable = true)
|
||
/**
|
||
* Monto ventas a la fecha de ingreso de la situacion financiera
|
||
*/
|
||
private BigDecimal salesamount;
|
||
@Column(name = "CURRENTASSETS", nullable = true)
|
||
/**
|
||
* Activos corrientes a la fecha de ingreso de la situacion financiera.
|
||
*/
|
||
private BigDecimal currentassets;
|
||
@Column(name = "FIXEDASSETS", nullable = true)
|
||
/**
|
||
* Activos fijos a la fecha de ingreso de la situacion financiera
|
||
*/
|
||
private BigDecimal fixedassets;
|
||
@Column(name = "TOTALASSETS", nullable = true)
|
||
/**
|
||
* Total de activos activos corrienets + activos fijos + cuentas por cobrar
|
||
* a la fecha de ingreso de la situacion financiera
|
||
*/
|
||
private BigDecimal totalassets;
|
||
@Column(name = "WORKINGCAPITAL", nullable = true)
|
||
/**
|
||
* Capital de trabajo a la fecha de ingreso de la situacion financiera
|
||
*/
|
||
private BigDecimal workingcapital;
|
||
@Column(name = "NETINCOME", nullable = true)
|
||
/**
|
||
* Utilidad neta a la fecha de ingreso de la situacion financiera.
|
||
*/
|
||
private BigDecimal netincome;
|
||
@Column(name = "CURRENTLIABILITIES", nullable = true)
|
||
/**
|
||
* Pasivos corrientes a la fecha de ingreso de la situacion financiera.
|
||
*/
|
||
private BigDecimal currentliabilities;
|
||
@Column(name = "PATRIMONY", nullable = true)
|
||
/**
|
||
* Patrimonio a la fecha de ingreso de la situacion financiera
|
||
*/
|
||
private BigDecimal patrimony;
|
||
@Column(name = "CASH", nullable = true)
|
||
/**
|
||
* Monto en caja y bancos a la fecha de ingreso de la situacion financiera
|
||
*/
|
||
private BigDecimal cash;
|
||
@Column(name = "INVENTORY", nullable = true)
|
||
/**
|
||
* Monto en productos para la venta en stock a la fecha de ingreso de la
|
||
* situacion financiera
|
||
*/
|
||
private BigDecimal inventory;
|
||
@Column(name = "LONGTERMDEBT", nullable = true)
|
||
/**
|
||
* Deuda a largo plazo a la fecha de ingreso de la situacion financiera
|
||
*/
|
||
private BigDecimal longtermdebt;
|
||
@Column(name = "GROSSRECEIPTS", nullable = true)
|
||
/**
|
||
* Ingreos brutos ventas netas + otros ingresos a la fecha de ingreso de la
|
||
* situacion financiera
|
||
*/
|
||
private BigDecimal grossreceipts;
|
||
@Column(name = "INTERESTOPAID", nullable = true)
|
||
/**
|
||
* Monto pagado en intereses a la fecha de ingreso de la situacion
|
||
* financiera
|
||
*/
|
||
private BigDecimal interestopaid;
|
||
@Column(name = "RETAINEDEARNINGS", nullable = true)
|
||
/**
|
||
* Ganancias retenidas a la fecha de ingreso de la situacion financiera
|
||
*/
|
||
private BigDecimal retainedearnings;
|
||
@Column(name = "SALESEXPENSE", nullable = true)
|
||
/**
|
||
* Costo de ventas a la fecha de ingreso de la situacion financiera
|
||
*/
|
||
private BigDecimal salesexpense;
|
||
|
||
/**
|
||
* Contructor por defecto
|
||
*/
|
||
public TcustCompanyFinancial() {
|
||
}
|
||
|
||
/**
|
||
* Contructor de TcustCompanyFinancial
|
||
*
|
||
* @param pPk Clave Primaria del entity
|
||
* @param pDatefrom Fecha desde la cual esta vigente el registro
|
||
*/
|
||
public TcustCompanyFinancial(TcustCompanyFinancialKey pPk, Timestamp pDatefrom) {
|
||
this();
|
||
pk = pPk;
|
||
datefrom = pDatefrom;
|
||
}
|
||
|
||
/**
|
||
* 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 TcustCompanyFinancial
|
||
*/
|
||
public static TcustCompanyFinancial find(EntityManager pEntityManager, TcustCompanyFinancialKey pKey) throws Exception {
|
||
TcustCompanyFinancial obj = pEntityManager.find(TcustCompanyFinancial.class, pKey);
|
||
return obj;
|
||
}
|
||
|
||
/**
|
||
* Entrega la Clave primaria de TcustCompanyFinancial
|
||
*
|
||
* @return El objeto que referencia a la Clave primaria de
|
||
* TcustCompanyFinancial
|
||
*/
|
||
public TcustCompanyFinancialKey getPk() {
|
||
return pk;
|
||
}
|
||
|
||
/**
|
||
* Fija un nuevo valor a la Clave primaria de TcustCompanyFinancial
|
||
*
|
||
* @param pPk El objeto que referencia a la nueva Clave primaria de
|
||
* TcustCompanyFinancial
|
||
*/
|
||
public void setPk(TcustCompanyFinancialKey pPk) {
|
||
pk = pPk;
|
||
}
|
||
|
||
/**
|
||
* 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 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 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 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 situationdate
|
||
*
|
||
* @return valor de situationdate
|
||
*/
|
||
public Date getSituationdate() {
|
||
return situationdate;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de situationdate
|
||
*
|
||
* @param pSituationdate nuevo Valor de situationdate
|
||
*/
|
||
public void setSituationdate(Date pSituationdate) {
|
||
situationdate = pSituationdate;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de salesamount
|
||
*
|
||
* @return valor de salesamount
|
||
*/
|
||
public BigDecimal getSalesamount() {
|
||
return salesamount;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de salesamount
|
||
*
|
||
* @param pSalesamount nuevo Valor de salesamount
|
||
*/
|
||
public void setSalesamount(BigDecimal pSalesamount) {
|
||
salesamount = pSalesamount;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de currentassets
|
||
*
|
||
* @return valor de currentassets
|
||
*/
|
||
public BigDecimal getCurrentassets() {
|
||
return currentassets;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de currentassets
|
||
*
|
||
* @param pCurrentassets nuevo Valor de currentassets
|
||
*/
|
||
public void setCurrentassets(BigDecimal pCurrentassets) {
|
||
currentassets = pCurrentassets;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de fixedassets
|
||
*
|
||
* @return valor de fixedassets
|
||
*/
|
||
public BigDecimal getFixedassets() {
|
||
return fixedassets;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de fixedassets
|
||
*
|
||
* @param pFixedassets nuevo Valor de fixedassets
|
||
*/
|
||
public void setFixedassets(BigDecimal pFixedassets) {
|
||
fixedassets = pFixedassets;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de totalassets
|
||
*
|
||
* @return valor de totalassets
|
||
*/
|
||
public BigDecimal getTotalassets() {
|
||
return totalassets;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de totalassets
|
||
*
|
||
* @param pTotalassets nuevo Valor de totalassets
|
||
*/
|
||
public void setTotalassets(BigDecimal pTotalassets) {
|
||
totalassets = pTotalassets;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de workingcapital
|
||
*
|
||
* @return valor de workingcapital
|
||
*/
|
||
public BigDecimal getWorkingcapital() {
|
||
return workingcapital;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de workingcapital
|
||
*
|
||
* @param pWorkingcapital nuevo Valor de workingcapital
|
||
*/
|
||
public void setWorkingcapital(BigDecimal pWorkingcapital) {
|
||
workingcapital = pWorkingcapital;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de netincome
|
||
*
|
||
* @return valor de netincome
|
||
*/
|
||
public BigDecimal getNetincome() {
|
||
return netincome;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de netincome
|
||
*
|
||
* @param pNetincome nuevo Valor de netincome
|
||
*/
|
||
public void setNetincome(BigDecimal pNetincome) {
|
||
netincome = pNetincome;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de currentliabilities
|
||
*
|
||
* @return valor de currentliabilities
|
||
*/
|
||
public BigDecimal getCurrentliabilities() {
|
||
return currentliabilities;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de currentliabilities
|
||
*
|
||
* @param pCurrentliabilities nuevo Valor de currentliabilities
|
||
*/
|
||
public void setCurrentliabilities(BigDecimal pCurrentliabilities) {
|
||
currentliabilities = pCurrentliabilities;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de patrimony
|
||
*
|
||
* @return valor de patrimony
|
||
*/
|
||
public BigDecimal getPatrimony() {
|
||
return patrimony;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de patrimony
|
||
*
|
||
* @param pPatrimony nuevo Valor de patrimony
|
||
*/
|
||
public void setPatrimony(BigDecimal pPatrimony) {
|
||
patrimony = pPatrimony;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de cash
|
||
*
|
||
* @return valor de cash
|
||
*/
|
||
public BigDecimal getCash() {
|
||
return cash;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de cash
|
||
*
|
||
* @param pCash nuevo Valor de cash
|
||
*/
|
||
public void setCash(BigDecimal pCash) {
|
||
cash = pCash;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de inventory
|
||
*
|
||
* @return valor de inventory
|
||
*/
|
||
public BigDecimal getInventory() {
|
||
return inventory;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de inventory
|
||
*
|
||
* @param pInventory nuevo Valor de inventory
|
||
*/
|
||
public void setInventory(BigDecimal pInventory) {
|
||
inventory = pInventory;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de longtermdebt
|
||
*
|
||
* @return valor de longtermdebt
|
||
*/
|
||
public BigDecimal getLongtermdebt() {
|
||
return longtermdebt;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de longtermdebt
|
||
*
|
||
* @param pLongtermdebt nuevo Valor de longtermdebt
|
||
*/
|
||
public void setLongtermdebt(BigDecimal pLongtermdebt) {
|
||
longtermdebt = pLongtermdebt;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de grossreceipts
|
||
*
|
||
* @return valor de grossreceipts
|
||
*/
|
||
public BigDecimal getGrossreceipts() {
|
||
return grossreceipts;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de grossreceipts
|
||
*
|
||
* @param pGrossreceipts nuevo Valor de grossreceipts
|
||
*/
|
||
public void setGrossreceipts(BigDecimal pGrossreceipts) {
|
||
grossreceipts = pGrossreceipts;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de interestopaid
|
||
*
|
||
* @return valor de interestopaid
|
||
*/
|
||
public BigDecimal getInterestopaid() {
|
||
return interestopaid;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de interestopaid
|
||
*
|
||
* @param pInterestopaid nuevo Valor de interestopaid
|
||
*/
|
||
public void setInterestopaid(BigDecimal pInterestopaid) {
|
||
interestopaid = pInterestopaid;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de retainedearnings
|
||
*
|
||
* @return valor de retainedearnings
|
||
*/
|
||
public BigDecimal getRetainedearnings() {
|
||
return retainedearnings;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de retainedearnings
|
||
*
|
||
* @param pRetainedearnings nuevo Valor de retainedearnings
|
||
*/
|
||
public void setRetainedearnings(BigDecimal pRetainedearnings) {
|
||
retainedearnings = pRetainedearnings;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de salesexpense
|
||
*
|
||
* @return valor de salesexpense
|
||
*/
|
||
public BigDecimal getSalesexpense() {
|
||
return salesexpense;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de salesexpense
|
||
*
|
||
* @param pSalesexpense nuevo Valor de salesexpense
|
||
*/
|
||
public void setSalesexpense(BigDecimal pSalesexpense) {
|
||
salesexpense = pSalesexpense;
|
||
}
|
||
|
||
public boolean equals(Object rhs) {
|
||
if (rhs == null) {
|
||
return false;
|
||
}
|
||
if (!(rhs instanceof TcustCompanyFinancial)) {
|
||
return false;
|
||
}
|
||
TcustCompanyFinancial that = (TcustCompanyFinancial) 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 TcustCompanyFinancial
|
||
*
|
||
* @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 TcustCompanyFinancial
|
||
*/
|
||
public Object createInstance() {
|
||
TcustCompanyFinancial instance = new TcustCompanyFinancial();
|
||
instance.setPk(new TcustCompanyFinancialKey());
|
||
return instance;
|
||
}
|
||
|
||
/**
|
||
* Clona la entidad TcustCompanyFinancial
|
||
*
|
||
* @see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
public Object cloneMe() throws CloneNotSupportedException {
|
||
TcustCompanyFinancial p = (TcustCompanyFinancial) this.clone();
|
||
p.setPk((TcustCompanyFinancialKey) this.pk.cloneMe());
|
||
return p;
|
||
}
|
||
|
||
public Object getId() {
|
||
return this.pk;
|
||
}
|
||
}
|