225 lines
5.9 KiB
Plaintext
Executable File
225 lines
5.9 KiB
Plaintext
Executable File
package com.fp.persistence.parmas.fun;
|
|
|
|
import javax.persistence.Entity;
|
|
import java.sql.Timestamp;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Column;
|
|
import javax.persistence.EntityManager;
|
|
import java.io.Serializable;
|
|
import javax.persistence.Table;
|
|
import com.fp.dto.hb.HibernateBean;
|
|
import java.lang.reflect.Field;
|
|
import javax.persistence.Transient;
|
|
|
|
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TARMCASHMANAGEMENTHISTORY*/
|
|
@Entity(name="TarmCashManagementHistory")
|
|
@Table(name="TARMCASHMANAGEMENTHISTORY")
|
|
public class TarmCashManagementHistory extends com.fp.dto.AbstractDataTransport implements Serializable,HibernateBean,Cloneable{
|
|
/**
|
|
* 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 TarmCashManagementHistory
|
|
*/
|
|
@Id
|
|
@Column(name="CCASHMANAGEMENT" ,nullable=false, updatable=false)
|
|
private String pk;
|
|
@Column(name="PATHREPORTE", nullable=false)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String pathreporte;
|
|
|
|
@Column(name="USERCODE", nullable=false)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String usercode;
|
|
|
|
@Column(name="DATEFROM", nullable=false)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private Timestamp datefrom;
|
|
|
|
@Column(name="DATETO", nullable=false)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private Timestamp dateto;
|
|
|
|
@Column(name="NOMBREARCHIVO", nullable=false)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String nombrearchivo;
|
|
|
|
/**Contructor por defecto*/
|
|
public TarmCashManagementHistory(){
|
|
}
|
|
/**Contructor de TarmCashManagementHistory
|
|
@param pPk Clave Primaria del entity
|
|
@param pPathreporte null
|
|
@param pUsercode null
|
|
@param pDatefrom null
|
|
@param pDateto null
|
|
@param pNombrearchivo null
|
|
*/
|
|
public TarmCashManagementHistory(String pPk,String pPathreporte,String pUsercode,Timestamp pDatefrom,Timestamp pDateto,String pNombrearchivo){
|
|
this();
|
|
pk=pPk;
|
|
pathreporte=pPathreporte;
|
|
usercode=pUsercode;
|
|
datefrom=pDatefrom;
|
|
dateto=pDateto;
|
|
nombrearchivo=pNombrearchivo;
|
|
}
|
|
/**
|
|
* 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 TarmCashManagementHistory
|
|
*/
|
|
public static TarmCashManagementHistory find(EntityManager pEntityManager,Object pKey) throws Exception{
|
|
TarmCashManagementHistory obj = pEntityManager.find(TarmCashManagementHistory.class,pKey);
|
|
return obj;
|
|
}
|
|
/**Entrega la Clave primaria de TarmCashManagementHistory
|
|
@return El objeto que referencia a la Clave primaria de TarmCashManagementHistory
|
|
*/
|
|
public String getPk(){
|
|
return pk;
|
|
}
|
|
/**Fija un nuevo valor a la Clave primaria de TarmCashManagementHistory
|
|
@param pPk El objeto que referencia a la nueva Clave primaria de TarmCashManagementHistory
|
|
*/
|
|
public void setPk(String pPk){
|
|
pk=pPk;
|
|
}
|
|
/**Obtiene el valor de pathreporte
|
|
@return valor de pathreporte*/
|
|
public String getPathreporte(){
|
|
return pathreporte;
|
|
}
|
|
/**Fija el valor de pathreporte
|
|
@param pPathreporte nuevo Valor de pathreporte*/
|
|
public void setPathreporte(String pPathreporte){
|
|
pathreporte=pPathreporte;
|
|
}
|
|
|
|
/**Obtiene el valor de usercode
|
|
@return valor de usercode*/
|
|
public String getUsercode(){
|
|
return usercode;
|
|
}
|
|
/**Fija el valor de usercode
|
|
@param pUsercode nuevo Valor de usercode*/
|
|
public void setUsercode(String pUsercode){
|
|
usercode=pUsercode;
|
|
}
|
|
|
|
/**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 dateto
|
|
@return valor de dateto*/
|
|
public Timestamp getDateto(){
|
|
return dateto;
|
|
}
|
|
/**Fija el valor de dateto
|
|
@param pDateto nuevo Valor de dateto*/
|
|
public void setDateto(Timestamp pDateto){
|
|
dateto=pDateto;
|
|
}
|
|
|
|
/**Obtiene el valor de nombrearchivo
|
|
@return valor de nombrearchivo*/
|
|
public String getNombrearchivo(){
|
|
return nombrearchivo;
|
|
}
|
|
/**Fija el valor de nombrearchivo
|
|
@param pNombrearchivo nuevo Valor de nombrearchivo*/
|
|
public void setNombrearchivo(String pNombrearchivo){
|
|
nombrearchivo=pNombrearchivo;
|
|
}
|
|
|
|
public boolean equals(Object rhs){
|
|
if (rhs == null)return false;
|
|
if (! (rhs instanceof TarmCashManagementHistory))return false;
|
|
TarmCashManagementHistory that = (TarmCashManagementHistory) rhs;
|
|
if (this.getPk() == null || that.getPk() == null)
|
|
return false;
|
|
return (this.getPk().equals(that.getPk()));
|
|
}
|
|
/**Implementacion del metodo hashCode de la la entidad TarmCashManagementHistory
|
|
@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 TarmCashManagementHistory
|
|
*/
|
|
public Object createInstance(){
|
|
TarmCashManagementHistory instance=new TarmCashManagementHistory();
|
|
return instance;
|
|
}
|
|
/**Clona la entidad TarmCashManagementHistory
|
|
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
|
*/
|
|
public Object cloneMe() throws CloneNotSupportedException{
|
|
TarmCashManagementHistory p=(TarmCashManagementHistory)this.clone();
|
|
return p;
|
|
}
|
|
public Object getId() {
|
|
return this.pk;
|
|
}
|
|
}
|