368 lines
8.8 KiB
Plaintext
Executable File
368 lines
8.8 KiB
Plaintext
Executable File
package com.fp.persistence.parmas.fun;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Column;
|
|
import javax.persistence.EntityManager;
|
|
|
|
import java.io.Serializable;
|
|
import java.math.BigDecimal;
|
|
|
|
import javax.persistence.Table;
|
|
|
|
import com.fp.dto.hb.HibernateBean;
|
|
import com.fp.dto.hb.Log;
|
|
|
|
import javax.persistence.Version;
|
|
|
|
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 TARMREGISTROARMAS*/
|
|
@Entity(name="TarmRegistroArmas")
|
|
@Table(name="TARMREGISTROARMAS")
|
|
public class TarmRegistroArmas 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 TarmRegistroArmas
|
|
*/
|
|
@Id
|
|
@Column(name="CREGISTRO" ,nullable=false, updatable=false)
|
|
private Long pk;
|
|
@Column(name="PERSONCODE", nullable=true)
|
|
|
|
/**
|
|
* Codigo de persona
|
|
*/
|
|
private Integer personcode;
|
|
|
|
@Column(name="TIPOREGISTRO", nullable=true)
|
|
|
|
/**
|
|
* Codigo de catalogo 01 Natural, 02 Juridico
|
|
*/
|
|
private String tiporegistro;
|
|
|
|
@Column(name="TIPOREGISTROCODIGO", nullable=true)
|
|
|
|
/**
|
|
* Codigo de tabla de catalogo Codigo de tabla de tipos de Registro
|
|
*/
|
|
private String tiporegistrocodigo;
|
|
|
|
@Column(name="PAISORIGEN", nullable=true)
|
|
|
|
/**
|
|
* Codigo de pais
|
|
*/
|
|
private String paisorigen;
|
|
|
|
@Column(name="FCREACION", nullable=true)
|
|
|
|
/**
|
|
* Fecha de creación del registro
|
|
|
|
*/
|
|
private Date fcreacion;
|
|
|
|
@Column(name="FABRICANTE", nullable=true)
|
|
|
|
/**
|
|
* Nombre del fabricante del arma
|
|
*/
|
|
private String fabricante;
|
|
|
|
@Column(name="DUI", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String dui;
|
|
|
|
@Column(name="TOTALFOB", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private BigDecimal totalfob;
|
|
|
|
@Version
|
|
@Column(name="RECORDVERSION", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private Integer recordversion;
|
|
|
|
@Column(name="TRAMITE", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private Long tramite;
|
|
|
|
@Column(name="AEROPUERTOPUERTO", nullable=true)
|
|
|
|
/**
|
|
* Nombre del aeropuerto o puerto referente a la importacion
|
|
*/
|
|
private String aeropuertopuerto;
|
|
|
|
@Column(name="SOLICITUDNUM", nullable=true)
|
|
|
|
/**
|
|
* Numero de la solicitud relacionada con la importacion
|
|
*/
|
|
private String solicitudnum;
|
|
|
|
@Column(name="FECHASOLICITUD", nullable=true)
|
|
|
|
/**
|
|
* Fecha de la solicitud
|
|
*/
|
|
private Date fechasolicitud;
|
|
|
|
/**Contructor por defecto*/
|
|
public TarmRegistroArmas(){
|
|
}
|
|
/**Contructor de TarmRegistroArmas
|
|
@param pPk Clave Primaria del entity
|
|
*/
|
|
public TarmRegistroArmas(Long 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 TarmRegistroArmas
|
|
*/
|
|
public static TarmRegistroArmas find(EntityManager pEntityManager,Object pKey) throws Exception{
|
|
TarmRegistroArmas obj = pEntityManager.find(TarmRegistroArmas.class,pKey);
|
|
return obj;
|
|
}
|
|
/**Entrega la Clave primaria de TarmRegistroArmas
|
|
@return El objeto que referencia a la Clave primaria de TarmRegistroArmas
|
|
*/
|
|
public Long getPk(){
|
|
return pk;
|
|
}
|
|
/**Fija un nuevo valor a la Clave primaria de TarmRegistroArmas
|
|
@param pPk El objeto que referencia a la nueva Clave primaria de TarmRegistroArmas
|
|
*/
|
|
public void setPk(Long pPk){
|
|
pk=pPk;
|
|
}
|
|
/**Obtiene el valor de personcode
|
|
@return valor de personcode*/
|
|
public Integer getPersoncode(){
|
|
return personcode;
|
|
}
|
|
/**Fija el valor de personcode
|
|
@param pPersoncode nuevo Valor de personcode*/
|
|
public void setPersoncode(Integer pPersoncode){
|
|
personcode=pPersoncode;
|
|
}
|
|
|
|
/**Obtiene el valor de tiporegistro
|
|
@return valor de tiporegistro*/
|
|
public String getTiporegistro(){
|
|
return tiporegistro;
|
|
}
|
|
/**Fija el valor de tiporegistro
|
|
@param pTiporegistro nuevo Valor de tiporegistro*/
|
|
public void setTiporegistro(String pTiporegistro){
|
|
tiporegistro=pTiporegistro;
|
|
}
|
|
|
|
/**Obtiene el valor de tiporegistrocodigo
|
|
@return valor de tiporegistrocodigo*/
|
|
public String getTiporegistrocodigo(){
|
|
return tiporegistrocodigo;
|
|
}
|
|
/**Fija el valor de tiporegistrocodigo
|
|
@param pTiporegistrocodigo nuevo Valor de tiporegistrocodigo*/
|
|
public void setTiporegistrocodigo(String pTiporegistrocodigo){
|
|
tiporegistrocodigo=pTiporegistrocodigo;
|
|
}
|
|
|
|
/**Obtiene el valor de paisorigen
|
|
@return valor de paisorigen*/
|
|
public String getPaisorigen(){
|
|
return paisorigen;
|
|
}
|
|
/**Fija el valor de paisorigen
|
|
@param pPaisorigen nuevo Valor de paisorigen*/
|
|
public void setPaisorigen(String pPaisorigen){
|
|
paisorigen=pPaisorigen;
|
|
}
|
|
|
|
/**Obtiene el valor de fcreacion
|
|
@return valor de fcreacion*/
|
|
public Date getFcreacion(){
|
|
return fcreacion;
|
|
}
|
|
/**Fija el valor de fcreacion
|
|
@param pFcreacion nuevo Valor de fcreacion*/
|
|
public void setFcreacion(Date pFcreacion){
|
|
fcreacion=pFcreacion;
|
|
}
|
|
|
|
/**Obtiene el valor de fabricante
|
|
@return valor de fabricante*/
|
|
public String getFabricante(){
|
|
return fabricante;
|
|
}
|
|
/**Fija el valor de fabricante
|
|
@param pFabricante nuevo Valor de fabricante*/
|
|
public void setFabricante(String pFabricante){
|
|
fabricante=pFabricante;
|
|
}
|
|
|
|
/**Obtiene el valor de dui
|
|
@return valor de dui*/
|
|
public String getDui(){
|
|
return dui;
|
|
}
|
|
/**Fija el valor de dui
|
|
@param pDui nuevo Valor de dui*/
|
|
public void setDui(String pDui){
|
|
dui=pDui;
|
|
}
|
|
|
|
/**Obtiene el valor de totalfob
|
|
@return valor de totalfob*/
|
|
public BigDecimal getTotalfob(){
|
|
return totalfob;
|
|
}
|
|
/**Fija el valor de totalfob
|
|
@param pTotalfob nuevo Valor de totalfob*/
|
|
public void setTotalfob(BigDecimal pTotalfob){
|
|
totalfob=pTotalfob;
|
|
}
|
|
|
|
/**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 tramite
|
|
@return valor de tramite*/
|
|
public Long getTramite(){
|
|
return tramite;
|
|
}
|
|
/**Fija el valor de tramite
|
|
@param pTramite nuevo Valor de tramite*/
|
|
public void setTramite(Long pTramite){
|
|
tramite=pTramite;
|
|
}
|
|
|
|
/**Obtiene el valor de aeropuertopuerto
|
|
@return valor de aeropuertopuerto*/
|
|
public String getAeropuertopuerto(){
|
|
return aeropuertopuerto;
|
|
}
|
|
/**Fija el valor de aeropuertopuerto
|
|
@param pAeropuertopuerto nuevo Valor de aeropuertopuerto*/
|
|
public void setAeropuertopuerto(String pAeropuertopuerto){
|
|
aeropuertopuerto=pAeropuertopuerto;
|
|
}
|
|
|
|
/**Obtiene el valor de solicitudnum
|
|
@return valor de solicitudnum*/
|
|
public String getSolicitudnum(){
|
|
return solicitudnum;
|
|
}
|
|
/**Fija el valor de solicitudnum
|
|
@param pSolicitudnum nuevo Valor de solicitudnum*/
|
|
public void setSolicitudnum(String pSolicitudnum){
|
|
solicitudnum=pSolicitudnum;
|
|
}
|
|
|
|
/**Obtiene el valor de fechasolicitud
|
|
@return valor de fechasolicitud*/
|
|
public Date getFechasolicitud(){
|
|
return fechasolicitud;
|
|
}
|
|
/**Fija el valor de fechasolicitud
|
|
@param pFechasolicitud nuevo Valor de fechasolicitud*/
|
|
public void setFechasolicitud(Date pFechasolicitud){
|
|
fechasolicitud=pFechasolicitud;
|
|
}
|
|
|
|
public boolean equals(Object rhs){
|
|
if (rhs == null)return false;
|
|
if (! (rhs instanceof TarmRegistroArmas))return false;
|
|
TarmRegistroArmas that = (TarmRegistroArmas) rhs;
|
|
if (this.getPk() == null || that.getPk() == null)
|
|
return false;
|
|
return (this.getPk().equals(that.getPk()));
|
|
}
|
|
/**Implementacion del metodo hashCode de la la entidad TarmRegistroArmas
|
|
@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;
|
|
}
|
|
/**Implementacion 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;
|
|
}
|
|
/**Implementacion de la creacion de un bean en blanco TarmRegistroArmas
|
|
*/
|
|
public Object createInstance(){
|
|
TarmRegistroArmas instance=new TarmRegistroArmas();
|
|
return instance;
|
|
}
|
|
/**Clona la entidad TarmRegistroArmas
|
|
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
|
*/
|
|
public Object cloneMe() throws CloneNotSupportedException{
|
|
TarmRegistroArmas p=(TarmRegistroArmas)this.clone();
|
|
return p;
|
|
}
|
|
}
|