259 lines
7.0 KiB
Plaintext
Executable File
259 lines
7.0 KiB
Plaintext
Executable File
package com.fp.persistence.parmas.soli;
|
|
|
|
import java.io.Serializable;
|
|
import java.lang.reflect.Field;
|
|
import java.sql.Date;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.EntityManager;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
import javax.persistence.Transient;
|
|
|
|
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 TARMDECOMISOARMATRANSACCION*/
|
|
@Entity(name="TarmDecomisoArmaTransaccion")
|
|
@Table(name="TARMDECOMISOARMATRANSACCION")
|
|
public class TarmDecomisoArmaTransaccion 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 TarmDecomisoArmaTransaccion
|
|
*/
|
|
@Id
|
|
@Column(name="CDECOMISOARMATRANSACCION" ,nullable=false, updatable=false)
|
|
private Long pk;
|
|
@Column(name="FCORTE", nullable=false)
|
|
|
|
/**
|
|
* FECHA DE CORTE EN LA CUAL SE REALIZO LA GENERACION DEL NUMERO DE ENVIO
|
|
*/
|
|
private Date fcorte;
|
|
|
|
@Column(name="NUMEROTRANSACCION", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String numerotransaccion;
|
|
|
|
@Column(name="CCONTROL", nullable=false)
|
|
|
|
/**
|
|
* CODIGO DEL CENTRO DE CONTROL AL CUAL PERTENECE ESTE ENVIO
|
|
*/
|
|
private String ccentrocontrol;
|
|
|
|
@Column(name="FTRANSACCION", nullable=false)
|
|
|
|
/**
|
|
* REGISTRO DE LA FECHA EN LA CUAL SE GENERO ESTE CODIGO DE TRANSACCION
|
|
*/
|
|
private Date ftransaccion;
|
|
|
|
@Column(name="XPATH", nullable=true)
|
|
|
|
/**
|
|
* ruta del archivo que se almacena en el alfresco, para la recepcion de las armas
|
|
*/
|
|
private String xpath;
|
|
|
|
@Column(name="ESTADOFLUJO", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String estadoflujo;
|
|
|
|
@Column(name="ESTADOFIRMA", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String estadofirma;
|
|
|
|
|
|
/**Contructor por defecto*/
|
|
public TarmDecomisoArmaTransaccion(){
|
|
}
|
|
/**Contructor de TarmDecomisoArmaTransaccion
|
|
@param pPk Clave Primaria del entity
|
|
@param pFcorte FECHA DE CORTE EN LA CUAL SE REALIZO LA GENERACION DEL NUMERO DE ENVIO
|
|
@param pCcontrol CODIGO DEL CENTRO DE CONTROL AL CUAL PERTENECE ESTE ENVIO
|
|
@param pFtransaccion REGISTRO DE LA FECHA EN LA CUAL SE GENERO ESTE CODIGO DE TRANSACCION
|
|
*/
|
|
public TarmDecomisoArmaTransaccion(Long pPk,Date pFcorte,String pCcontrol,Date pFtransaccion){
|
|
this();
|
|
pk=pPk;
|
|
fcorte=pFcorte;
|
|
ccentrocontrol=pCcontrol;
|
|
ftransaccion=pFtransaccion;
|
|
}
|
|
/**
|
|
* 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 TarmDecomisoArmaTransaccion
|
|
*/
|
|
public static TarmDecomisoArmaTransaccion find(EntityManager pEntityManager,Object pKey) throws Exception{
|
|
TarmDecomisoArmaTransaccion obj = pEntityManager.find(TarmDecomisoArmaTransaccion.class,pKey);
|
|
return obj;
|
|
}
|
|
/**Entrega la Clave primaria de TarmDecomisoArmaTransaccion
|
|
@return El objeto que referencia a la Clave primaria de TarmDecomisoArmaTransaccion
|
|
*/
|
|
public Long getPk(){
|
|
return pk;
|
|
}
|
|
/**Fija un nuevo valor a la Clave primaria de TarmDecomisoArmaTransaccion
|
|
@param pPk El objeto que referencia a la nueva Clave primaria de TarmDecomisoArmaTransaccion
|
|
*/
|
|
public void setPk(Long pPk){
|
|
pk=pPk;
|
|
}
|
|
/**Obtiene el valor de fcorte
|
|
@return valor de fcorte*/
|
|
public Date getFcorte(){
|
|
return fcorte;
|
|
}
|
|
/**Fija el valor de fcorte
|
|
@param pFcorte nuevo Valor de fcorte*/
|
|
public void setFcorte(Date pFcorte){
|
|
fcorte=pFcorte;
|
|
}
|
|
|
|
/**Obtiene el valor de numerotransaccion
|
|
@return valor de numerotransaccion*/
|
|
public String getNumerotransaccion(){
|
|
return numerotransaccion;
|
|
}
|
|
/**Fija el valor de numerotransaccion
|
|
@param pNumerotransaccion nuevo Valor de numerotransaccion*/
|
|
public void setNumerotransaccion(String pNumerotransaccion){
|
|
numerotransaccion=pNumerotransaccion;
|
|
}
|
|
|
|
/**Obtiene el valor de ccontrol
|
|
@return valor de ccontrol*/
|
|
public String getCcentrocontrol(){
|
|
return ccentrocontrol;
|
|
}
|
|
/**Fija el valor de ccontrol
|
|
@param pCcontrol nuevo Valor de ccontrol*/
|
|
public void setCcentrocontrol(String pCcontrol){
|
|
ccentrocontrol=pCcontrol;
|
|
}
|
|
|
|
/**Obtiene el valor de ftransaccion
|
|
@return valor de ftransaccion*/
|
|
public Date getFtransaccion(){
|
|
return ftransaccion;
|
|
}
|
|
/**Fija el valor de ftransaccion
|
|
@param pFtransaccion nuevo Valor de ftransaccion*/
|
|
public void setFtransaccion(Date pFtransaccion){
|
|
ftransaccion=pFtransaccion;
|
|
}
|
|
|
|
/**Obtiene el valor de xpath
|
|
@return valor de xpath*/
|
|
public String getXpath(){
|
|
return xpath;
|
|
}
|
|
/**Fija el valor de xpath
|
|
@param pXpath nuevo Valor de xpath*/
|
|
public void setXpath(String pXpath){
|
|
xpath=pXpath;
|
|
}
|
|
|
|
/**Obtiene el valor de estadoflujo
|
|
@return valor de estadoflujo*/
|
|
public String getEstadoflujo(){
|
|
return estadoflujo;
|
|
}
|
|
/**
|
|
* @return the estadofirma
|
|
*/
|
|
public String getEstadofirma() {
|
|
return estadofirma;
|
|
}
|
|
/**
|
|
* @param estadofirma the estadofirma to set
|
|
*/
|
|
public void setEstadofirma(String estadofirma) {
|
|
this.estadofirma = estadofirma;
|
|
}
|
|
/**Fija el valor de estadoflujo
|
|
@param pEstadoflujo nuevo Valor de estadoflujo*/
|
|
public void setEstadoflujo(String pEstadoflujo){
|
|
estadoflujo=pEstadoflujo;
|
|
}
|
|
public boolean equals(Object rhs){
|
|
if (rhs == null)return false;
|
|
if (! (rhs instanceof TarmDecomisoArmaTransaccion))return false;
|
|
TarmDecomisoArmaTransaccion that = (TarmDecomisoArmaTransaccion) rhs;
|
|
if (this.getPk() == null || that.getPk() == null)
|
|
return false;
|
|
return (this.getPk().equals(that.getPk()));
|
|
}
|
|
/**Implementacion del metodo hashCode de la la entidad TarmDecomisoArmaTransaccion
|
|
@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 TarmDecomisoArmaTransaccion
|
|
*/
|
|
public Object createInstance(){
|
|
TarmDecomisoArmaTransaccion instance=new TarmDecomisoArmaTransaccion();
|
|
return instance;
|
|
}
|
|
/**Clona la entidad TarmDecomisoArmaTransaccion
|
|
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
|
*/
|
|
public Object cloneMe() throws CloneNotSupportedException{
|
|
TarmDecomisoArmaTransaccion p=(TarmDecomisoArmaTransaccion)this.clone();
|
|
return p;
|
|
}
|
|
|
|
}
|