727 lines
19 KiB
Plaintext
Executable File
727 lines
19 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
|
||
* TCUSTCOMPANY
|
||
*/
|
||
@Entity(name = "TcustCompany")
|
||
@Table(name = "TCUSTCOMPANY")
|
||
public class TcustCompany 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 TcustCompany
|
||
*/
|
||
@EmbeddedId
|
||
private TcustCompanyKey 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 = "BUSINESSTYPECATALOG", nullable = true)
|
||
/**
|
||
* Codigo de catalogo de tipo de empresa, 1 Con fines de lucro, 2 Sin fines
|
||
* de lucro
|
||
*/
|
||
private String businesstypecatalog;
|
||
@Column(name = "BUSINESSTYPECATALOGCODE", nullable = true)
|
||
/**
|
||
* Codigo de tabla de catalogo de tipo de empresa BUSINESSTYPE
|
||
*/
|
||
private String businesstypecatalogcode;
|
||
@Column(name = "BUSINESSCLASSCATALOG", nullable = true)
|
||
/**
|
||
* Codigo de catalogo de clase de empresa 1, Pequenia, 2 Mediana
|
||
*/
|
||
private String businessclasscatalog;
|
||
@Column(name = "BUSINESSCLASSCATALOGCODE", nullable = true)
|
||
/**
|
||
* Codigo de catalogo de clase de empresa BUSINESSCLASS
|
||
*/
|
||
private String businessclasscatalogcode;
|
||
@Column(name = "INSTITUTIONTYPECATALOG", nullable = true)
|
||
/**
|
||
* Codigo de catalogo de tipo de institucion, 1 banco, 2 cooperativa, 3
|
||
* grupo solidario
|
||
*/
|
||
private String institutiontypecatalog;
|
||
@Column(name = "INSTITUTIONTYPECATALOGCODE", nullable = true)
|
||
/**
|
||
* Codigo de tabla de catalogo de tipo de institucion INSTITUTIONTYPE
|
||
*/
|
||
private String institutiontypecatalogcode;
|
||
@Column(name = "OPERATIVESTATUSCATALOG", nullable = true)
|
||
/**
|
||
* Codigo de catalogo 1 Disuelto, 2 Suspendido, 3 Vigente
|
||
*/
|
||
private String operativestatuscatalog;
|
||
@Column(name = "OPERATIVESTATUSCATALOGCODE", nullable = true)
|
||
/**
|
||
* Codigo de tabla de catalogo OPERATIVESTATUS estatus operativo
|
||
*/
|
||
private String operativestatuscatalogcode;
|
||
@Column(name = "COMMERCIALREGISTER", nullable = true)
|
||
/**
|
||
* Numero de registro mercantil.
|
||
*/
|
||
private String commercialregister;
|
||
@Column(name = "EMPLOYERCODE", nullable = true)
|
||
/**
|
||
* Codigo de empleador
|
||
*/
|
||
private String employercode;
|
||
@Column(name = "CONSTITUTIONDATE", nullable = true)
|
||
/**
|
||
* Fecha de constitucion.
|
||
*/
|
||
private Date constitutiondate;
|
||
@Column(name = "EXPIRATIONDATE", nullable = true)
|
||
/**
|
||
* Fecha de vencimiento de la compania.
|
||
*/
|
||
private Date expirationdate;
|
||
@Column(name = "EMPLOYEENUMBER", nullable = true)
|
||
/**
|
||
* Numero de empleados
|
||
*/
|
||
private Integer employeenumber;
|
||
@Column(name = "NOMINALCAPITAL", nullable = true)
|
||
/**
|
||
* Capittal nominal.
|
||
*/
|
||
private BigDecimal nominalcapital;
|
||
@Column(name = "ORIGINALCAPITAL", nullable = true)
|
||
/**
|
||
* Capital original.
|
||
*/
|
||
private BigDecimal originalcapital;
|
||
@Column(name = "CONTRIBUTEDCAPITAL", nullable = true)
|
||
/**
|
||
* Capital suscrito
|
||
*/
|
||
private BigDecimal contributedcapital;
|
||
@Column(name = "CORPORATEPURPOSE", nullable = true)
|
||
/**
|
||
* Proposito general de la empresa.
|
||
*/
|
||
private String corporatepurpose;
|
||
@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 = "MEMBERSNUMBER", nullable = true)
|
||
/**
|
||
* Numero de socios
|
||
*/
|
||
private Integer membersnumber;
|
||
@Column(name = "LOGO", nullable = true)
|
||
/**
|
||
* Codigo de imagen
|
||
*/
|
||
private Integer logo;
|
||
|
||
@Column(name = "PICTURE", nullable = true)
|
||
/**
|
||
* Imagen
|
||
*/
|
||
private byte[] picture;
|
||
|
||
/**
|
||
* Contructor por defecto
|
||
*/
|
||
public TcustCompany() {
|
||
}
|
||
|
||
/**
|
||
* Contructor de TcustCompany
|
||
*
|
||
* @param pPk Clave Primaria del entity
|
||
*/
|
||
public TcustCompany(TcustCompanyKey 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 TcustCompany
|
||
*/
|
||
public static TcustCompany find(EntityManager pEntityManager, TcustCompanyKey pKey) throws Exception {
|
||
TcustCompany obj = pEntityManager.find(TcustCompany.class, pKey);
|
||
return obj;
|
||
}
|
||
|
||
/**
|
||
* Entrega la Clave primaria de TcustCompany
|
||
*
|
||
* @return El objeto que referencia a la Clave primaria de TcustCompany
|
||
*/
|
||
public TcustCompanyKey getPk() {
|
||
return pk;
|
||
}
|
||
|
||
/**
|
||
* Fija un nuevo valor a la Clave primaria de TcustCompany
|
||
*
|
||
* @param pPk El objeto que referencia a la nueva Clave primaria de
|
||
* TcustCompany
|
||
*/
|
||
public void setPk(TcustCompanyKey pPk) {
|
||
pk = pPk;
|
||
}
|
||
|
||
/**
|
||
* 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 businesstypecatalog
|
||
*
|
||
* @return valor de businesstypecatalog
|
||
*/
|
||
public String getBusinesstypecatalog() {
|
||
return businesstypecatalog;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de businesstypecatalog
|
||
*
|
||
* @param pBusinesstypecatalog nuevo Valor de businesstypecatalog
|
||
*/
|
||
public void setBusinesstypecatalog(String pBusinesstypecatalog) {
|
||
businesstypecatalog = pBusinesstypecatalog;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de businesstypecatalogcode
|
||
*
|
||
* @return valor de businesstypecatalogcode
|
||
*/
|
||
public String getBusinesstypecatalogcode() {
|
||
return businesstypecatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de businesstypecatalogcode
|
||
*
|
||
* @param pBusinesstypecatalogcode nuevo Valor de businesstypecatalogcode
|
||
*/
|
||
public void setBusinesstypecatalogcode(String pBusinesstypecatalogcode) {
|
||
businesstypecatalogcode = pBusinesstypecatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de businessclasscatalog
|
||
*
|
||
* @return valor de businessclasscatalog
|
||
*/
|
||
public String getBusinessclasscatalog() {
|
||
return businessclasscatalog;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de businessclasscatalog
|
||
*
|
||
* @param pBusinessclasscatalog nuevo Valor de businessclasscatalog
|
||
*/
|
||
public void setBusinessclasscatalog(String pBusinessclasscatalog) {
|
||
businessclasscatalog = pBusinessclasscatalog;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de businessclasscatalogcode
|
||
*
|
||
* @return valor de businessclasscatalogcode
|
||
*/
|
||
public String getBusinessclasscatalogcode() {
|
||
return businessclasscatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de businessclasscatalogcode
|
||
*
|
||
* @param pBusinessclasscatalogcode nuevo Valor de businessclasscatalogcode
|
||
*/
|
||
public void setBusinessclasscatalogcode(String pBusinessclasscatalogcode) {
|
||
businessclasscatalogcode = pBusinessclasscatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de institutiontypecatalog
|
||
*
|
||
* @return valor de institutiontypecatalog
|
||
*/
|
||
public String getInstitutiontypecatalog() {
|
||
return institutiontypecatalog;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de institutiontypecatalog
|
||
*
|
||
* @param pInstitutiontypecatalog nuevo Valor de institutiontypecatalog
|
||
*/
|
||
public void setInstitutiontypecatalog(String pInstitutiontypecatalog) {
|
||
institutiontypecatalog = pInstitutiontypecatalog;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de institutiontypecatalogcode
|
||
*
|
||
* @return valor de institutiontypecatalogcode
|
||
*/
|
||
public String getInstitutiontypecatalogcode() {
|
||
return institutiontypecatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de institutiontypecatalogcode
|
||
*
|
||
* @param pInstitutiontypecatalogcode nuevo Valor de
|
||
* institutiontypecatalogcode
|
||
*/
|
||
public void setInstitutiontypecatalogcode(String pInstitutiontypecatalogcode) {
|
||
institutiontypecatalogcode = pInstitutiontypecatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de operativestatuscatalog
|
||
*
|
||
* @return valor de operativestatuscatalog
|
||
*/
|
||
public String getOperativestatuscatalog() {
|
||
return operativestatuscatalog;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de operativestatuscatalog
|
||
*
|
||
* @param pOperativestatuscatalog nuevo Valor de operativestatuscatalog
|
||
*/
|
||
public void setOperativestatuscatalog(String pOperativestatuscatalog) {
|
||
operativestatuscatalog = pOperativestatuscatalog;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de operativestatuscatalogcode
|
||
*
|
||
* @return valor de operativestatuscatalogcode
|
||
*/
|
||
public String getOperativestatuscatalogcode() {
|
||
return operativestatuscatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de operativestatuscatalogcode
|
||
*
|
||
* @param pOperativestatuscatalogcode nuevo Valor de
|
||
* operativestatuscatalogcode
|
||
*/
|
||
public void setOperativestatuscatalogcode(String pOperativestatuscatalogcode) {
|
||
operativestatuscatalogcode = pOperativestatuscatalogcode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de commercialregister
|
||
*
|
||
* @return valor de commercialregister
|
||
*/
|
||
public String getCommercialregister() {
|
||
return commercialregister;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de commercialregister
|
||
*
|
||
* @param pCommercialregister nuevo Valor de commercialregister
|
||
*/
|
||
public void setCommercialregister(String pCommercialregister) {
|
||
commercialregister = pCommercialregister;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de employercode
|
||
*
|
||
* @return valor de employercode
|
||
*/
|
||
public String getEmployercode() {
|
||
return employercode;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de employercode
|
||
*
|
||
* @param pEmployercode nuevo Valor de employercode
|
||
*/
|
||
public void setEmployercode(String pEmployercode) {
|
||
employercode = pEmployercode;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de constitutiondate
|
||
*
|
||
* @return valor de constitutiondate
|
||
*/
|
||
public Date getConstitutiondate() {
|
||
return constitutiondate;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de constitutiondate
|
||
*
|
||
* @param pConstitutiondate nuevo Valor de constitutiondate
|
||
*/
|
||
public void setConstitutiondate(Date pConstitutiondate) {
|
||
constitutiondate = pConstitutiondate;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de expirationdate
|
||
*
|
||
* @return valor de expirationdate
|
||
*/
|
||
public Date getExpirationdate() {
|
||
return expirationdate;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de expirationdate
|
||
*
|
||
* @param pExpirationdate nuevo Valor de expirationdate
|
||
*/
|
||
public void setExpirationdate(Date pExpirationdate) {
|
||
expirationdate = pExpirationdate;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de employeenumber
|
||
*
|
||
* @return valor de employeenumber
|
||
*/
|
||
public Integer getEmployeenumber() {
|
||
return employeenumber;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de employeenumber
|
||
*
|
||
* @param pEmployeenumber nuevo Valor de employeenumber
|
||
*/
|
||
public void setEmployeenumber(Integer pEmployeenumber) {
|
||
employeenumber = pEmployeenumber;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de nominalcapital
|
||
*
|
||
* @return valor de nominalcapital
|
||
*/
|
||
public BigDecimal getNominalcapital() {
|
||
return nominalcapital;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de nominalcapital
|
||
*
|
||
* @param pNominalcapital nuevo Valor de nominalcapital
|
||
*/
|
||
public void setNominalcapital(BigDecimal pNominalcapital) {
|
||
nominalcapital = pNominalcapital;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de originalcapital
|
||
*
|
||
* @return valor de originalcapital
|
||
*/
|
||
public BigDecimal getOriginalcapital() {
|
||
return originalcapital;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de originalcapital
|
||
*
|
||
* @param pOriginalcapital nuevo Valor de originalcapital
|
||
*/
|
||
public void setOriginalcapital(BigDecimal pOriginalcapital) {
|
||
originalcapital = pOriginalcapital;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de contributedcapital
|
||
*
|
||
* @return valor de contributedcapital
|
||
*/
|
||
public BigDecimal getContributedcapital() {
|
||
return contributedcapital;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de contributedcapital
|
||
*
|
||
* @param pContributedcapital nuevo Valor de contributedcapital
|
||
*/
|
||
public void setContributedcapital(BigDecimal pContributedcapital) {
|
||
contributedcapital = pContributedcapital;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de corporatepurpose
|
||
*
|
||
* @return valor de corporatepurpose
|
||
*/
|
||
public String getCorporatepurpose() {
|
||
return corporatepurpose;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de corporatepurpose
|
||
*
|
||
* @param pCorporatepurpose nuevo Valor de corporatepurpose
|
||
*/
|
||
public void setCorporatepurpose(String pCorporatepurpose) {
|
||
corporatepurpose = pCorporatepurpose;
|
||
}
|
||
|
||
/**
|
||
* 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 membersnumber
|
||
*
|
||
* @return valor de membersnumber
|
||
*/
|
||
public Integer getMembersnumber() {
|
||
return membersnumber;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de membersnumber
|
||
*
|
||
* @param pMembersnumber nuevo Valor de membersnumber
|
||
*/
|
||
public void setMembersnumber(Integer pMembersnumber) {
|
||
membersnumber = pMembersnumber;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de logo
|
||
*
|
||
* @return valor de logo
|
||
*/
|
||
public Integer getLogo() {
|
||
return logo;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de logo
|
||
*
|
||
* @param pLogo nuevo Valor de logo
|
||
*/
|
||
public void setLogo(Integer pLogo) {
|
||
logo = pLogo;
|
||
}
|
||
|
||
/**
|
||
* Obtiene el valor de la imagen
|
||
* @return valor de la imagen
|
||
*/
|
||
public byte[] getPicture() {
|
||
return picture;
|
||
}
|
||
|
||
/**
|
||
* Fija el valor de la imagen
|
||
* @param pLogo nuevo Valor de la imagen
|
||
*/
|
||
public void setPicture(byte[] picture) {
|
||
this.picture = picture;
|
||
}
|
||
|
||
public boolean equals(Object rhs) {
|
||
if (rhs == null) {
|
||
return false;
|
||
}
|
||
if (!(rhs instanceof TcustCompany)) {
|
||
return false;
|
||
}
|
||
TcustCompany that = (TcustCompany) 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 TcustCompany
|
||
*
|
||
* @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 TcustCompany
|
||
*/
|
||
public Object createInstance() {
|
||
TcustCompany instance = new TcustCompany();
|
||
instance.setPk(new TcustCompanyKey());
|
||
return instance;
|
||
}
|
||
|
||
/**
|
||
* Clona la entidad TcustCompany
|
||
*
|
||
* @see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
public Object cloneMe() throws CloneNotSupportedException {
|
||
TcustCompany p = (TcustCompany) this.clone();
|
||
p.setPk((TcustCompanyKey) this.pk.cloneMe());
|
||
return p;
|
||
}
|
||
|
||
public Object getId() {
|
||
return this.pk;
|
||
}
|
||
}
|