286 lines
6.8 KiB
Plaintext
Executable File
286 lines
6.8 KiB
Plaintext
Executable File
package com.fp.persistence.parmas.inte;
|
|
|
|
import javax.persistence.Entity;
|
|
import java.sql.Timestamp;
|
|
import com.fp.dto.hb.Log;
|
|
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 javax.persistence.Version;
|
|
import java.lang.reflect.Field;
|
|
import javax.persistence.Transient;
|
|
|
|
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TARMLECTURA*/
|
|
@Entity(name="TarmLectura")
|
|
@Table(name="TARMLECTURA")
|
|
public class TarmLectura 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 TarmLectura
|
|
*/
|
|
@Id
|
|
@Column(name="CLECTURA" ,nullable=false, updatable=false)
|
|
private Long pk;
|
|
@Column(name="DIRECCION", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String direccion;
|
|
|
|
@Column(name="IDPORTAL", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String idportal;
|
|
|
|
@Column(name="TIPOLECTURA", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String tipolectura;
|
|
|
|
@Column(name="CANTONCODE", nullable=true)
|
|
|
|
/**
|
|
* Codigo de canton
|
|
*/
|
|
private String cantoncode;
|
|
|
|
@Column(name="COUNTRYCODE", nullable=true)
|
|
|
|
/**
|
|
* Codigo de pais
|
|
*/
|
|
private String countrycode;
|
|
|
|
@Column(name="FECHA", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private Timestamp fecha;
|
|
|
|
@Column(name="PARROQUIACODE", nullable=true)
|
|
|
|
/**
|
|
* Codigo de parroquia
|
|
*/
|
|
private String parroquiacode;
|
|
|
|
@Column(name="TIPOLECTURACODE", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String tipolecturacode;
|
|
|
|
@Column(name="PROVINCECODE", nullable=true)
|
|
|
|
/**
|
|
* Codigo de provincia
|
|
*/
|
|
private String provincecode;
|
|
|
|
/**Contructor por defecto*/
|
|
public TarmLectura(){
|
|
}
|
|
/**Contructor de TarmLectura
|
|
@param pPk Clave Primaria del entity
|
|
*/
|
|
public TarmLectura(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 TarmLectura
|
|
*/
|
|
public static TarmLectura find(EntityManager pEntityManager,Object pKey) throws Exception{
|
|
TarmLectura obj = pEntityManager.find(TarmLectura.class,pKey);
|
|
return obj;
|
|
}
|
|
/**Entrega la Clave primaria de TarmLectura
|
|
@return El objeto que referencia a la Clave primaria de TarmLectura
|
|
*/
|
|
public Long getPk(){
|
|
return pk;
|
|
}
|
|
/**Fija un nuevo valor a la Clave primaria de TarmLectura
|
|
@param pPk El objeto que referencia a la nueva Clave primaria de TarmLectura
|
|
*/
|
|
public void setPk(Long pPk){
|
|
pk=pPk;
|
|
}
|
|
/**Obtiene el valor de direccion
|
|
@return valor de direccion*/
|
|
public String getDireccion(){
|
|
return direccion;
|
|
}
|
|
/**Fija el valor de direccion
|
|
@param pDireccion nuevo Valor de direccion*/
|
|
public void setDireccion(String pDireccion){
|
|
direccion=pDireccion;
|
|
}
|
|
|
|
/**Obtiene el valor de idportal
|
|
@return valor de idportal*/
|
|
public String getIdportal(){
|
|
return idportal;
|
|
}
|
|
/**Fija el valor de idportal
|
|
@param pIdportal nuevo Valor de idportal*/
|
|
public void setIdportal(String pIdportal){
|
|
idportal=pIdportal;
|
|
}
|
|
|
|
/**Obtiene el valor de tipolectura
|
|
@return valor de tipolectura*/
|
|
public String getTipolectura(){
|
|
return tipolectura;
|
|
}
|
|
/**Fija el valor de tipolectura
|
|
@param pTipolectura nuevo Valor de tipolectura*/
|
|
public void setTipolectura(String pTipolectura){
|
|
tipolectura=pTipolectura;
|
|
}
|
|
|
|
/**Obtiene el valor de cantoncode
|
|
@return valor de cantoncode*/
|
|
public String getCantoncode(){
|
|
return cantoncode;
|
|
}
|
|
/**Fija el valor de cantoncode
|
|
@param pCantoncode nuevo Valor de cantoncode*/
|
|
public void setCantoncode(String pCantoncode){
|
|
cantoncode=pCantoncode;
|
|
}
|
|
|
|
/**Obtiene el valor de countrycode
|
|
@return valor de countrycode*/
|
|
public String getCountrycode(){
|
|
return countrycode;
|
|
}
|
|
/**Fija el valor de countrycode
|
|
@param pCountrycode nuevo Valor de countrycode*/
|
|
public void setCountrycode(String pCountrycode){
|
|
countrycode=pCountrycode;
|
|
}
|
|
|
|
/**Obtiene el valor de fecha
|
|
@return valor de fecha*/
|
|
public Timestamp getFecha(){
|
|
return fecha;
|
|
}
|
|
/**Fija el valor de fecha
|
|
@param pFecha nuevo Valor de fecha*/
|
|
public void setFecha(Timestamp pFecha){
|
|
fecha=pFecha;
|
|
}
|
|
|
|
/**Obtiene el valor de parroquiacode
|
|
@return valor de parroquiacode*/
|
|
public String getParroquiacode(){
|
|
return parroquiacode;
|
|
}
|
|
/**Fija el valor de parroquiacode
|
|
@param pParroquiacode nuevo Valor de parroquiacode*/
|
|
public void setParroquiacode(String pParroquiacode){
|
|
parroquiacode=pParroquiacode;
|
|
}
|
|
|
|
/**Obtiene el valor de tipolecturacode
|
|
@return valor de tipolecturacode*/
|
|
public String getTipolecturacode(){
|
|
return tipolecturacode;
|
|
}
|
|
/**Fija el valor de tipolecturacode
|
|
@param pTipolecturacode nuevo Valor de tipolecturacode*/
|
|
public void setTipolecturacode(String pTipolecturacode){
|
|
tipolecturacode=pTipolecturacode;
|
|
}
|
|
|
|
/**Obtiene el valor de provincecode
|
|
@return valor de provincecode*/
|
|
public String getProvincecode(){
|
|
return provincecode;
|
|
}
|
|
/**Fija el valor de provincecode
|
|
@param pProvincecode nuevo Valor de provincecode*/
|
|
public void setProvincecode(String pProvincecode){
|
|
provincecode=pProvincecode;
|
|
}
|
|
|
|
public boolean equals(Object rhs){
|
|
if (rhs == null)return false;
|
|
if (! (rhs instanceof TarmLectura))return false;
|
|
TarmLectura that = (TarmLectura) rhs;
|
|
if (this.getPk() == null || that.getPk() == null)
|
|
return false;
|
|
return (this.getPk().equals(that.getPk()));
|
|
}
|
|
/**Implementacion del metodo hashCode de la la entidad TarmLectura
|
|
@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 TarmLectura
|
|
*/
|
|
public Object createInstance(){
|
|
TarmLectura instance=new TarmLectura();
|
|
return instance;
|
|
}
|
|
/**Clona la entidad TarmLectura
|
|
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
|
*/
|
|
public Object cloneMe() throws CloneNotSupportedException{
|
|
TarmLectura p=(TarmLectura)this.clone();
|
|
return p;
|
|
}
|
|
}
|