package com.fitbank.hb.persistence.gene;

import com.fitbank.common.hb.AbstractExpire;
import java.sql.Clob;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.sql.Timestamp;
import com.fitbank.common.TransportBean;

/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TPLANTILLASHTML*/
public class Thtmltemplate extends AbstractExpire  implements Serializable,TransportBean,Cloneable,com.fitbank.common.hb.AbstractId{
/** Nombre de la Tabla TPLANTILLASHTML */
public static final String TABLE_NAME = "TPLANTILLASHTML";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Clave primaria de la Entidad Thtmltemplate
*/
private ThtmltemplateKey pk;
/**
* Manejo de optimistic locking.
*/
private Integer versioncontrol;

/**
* Fecha desde la que esta vigente el registro.
*/
private Timestamp fdesde;

/**
* Clob con la fuente html
*/
private Clob fuentehtml;

/**
* Clob aplicado el formato html con parametros.
*/
private Clob formatohtml;

/**Contructor por defecto*/
public Thtmltemplate(){}
/**Contructor de Thtmltemplate
@param pPk Clave Primaria del entity
@param pFdesde Fecha desde la que esta vigente el registro.
@param pFuentehtml Clob con la fuente html
@param pFormatohtml Clob aplicado el formato html con parametros.
*/
public Thtmltemplate(ThtmltemplateKey pPk,Timestamp pFdesde,Clob pFuentehtml,Clob pFormatohtml){
 pk=pPk;
 fdesde=pFdesde;
 fuentehtml=pFuentehtml;
 formatohtml=pFormatohtml;
}
/**Entrega la Clave primaria de Thtmltemplate
@return El objeto que referencia a la Clave primaria de Thtmltemplate
*/
public ThtmltemplateKey getPk(){
  return pk;
}
/**Fija un nuevo valor a la Clave primaria de Thtmltemplate
@param pPk El objeto que referencia a la nueva Clave primaria de Thtmltemplate
*/
public void setPk(ThtmltemplateKey pPk){
  pk=pPk;
}
public static final String VERSIONCONTROL="VERSIONCONTROL";
/**Obtiene el valor de versioncontrol
@return valor de versioncontrol*/
public Integer getVersioncontrol(){
  return versioncontrol;
}
/**Fija el valor de versioncontrol
@param pVersioncontrol nuevo Valor de versioncontrol*/
public void setVersioncontrol(Integer pVersioncontrol){
  versioncontrol=pVersioncontrol;
}

public static final String FDESDE="FDESDE";
/**Obtiene el valor de fdesde
@return valor de fdesde*/
public Timestamp getFdesde(){
  return fdesde;
}
/**Fija el valor de fdesde
@param pFdesde nuevo Valor de fdesde*/
public void setFdesde(Timestamp pFdesde){
  fdesde=pFdesde;
}

public static final String FUENTEHTML="FUENTEHTML";
/**Obtiene el valor de fuentehtml
@return valor de fuentehtml*/
public Clob getFuentehtml(){
  return fuentehtml;
}
/**Fija el valor de fuentehtml
@param pFuentehtml nuevo Valor de fuentehtml*/
public void setFuentehtml(Clob pFuentehtml){
  fuentehtml=pFuentehtml;
}

public static final String FORMATOHTML="FORMATOHTML";
/**Obtiene el valor de formatohtml
@return valor de formatohtml*/
public Clob getFormatohtml(){
  return formatohtml;
}
/**Fija el valor de formatohtml
@param pFormatohtml nuevo Valor de formatohtml*/
public void setFormatohtml(Clob pFormatohtml){
  formatohtml=pFormatohtml;
}

/**Implementacion de la comparacion de la entidad Thtmltemplate
@param rhs Elemento de Comparacion
@return el resultado de la comparacion
*/
public boolean equals(Object rhs){
    if (rhs == null){return false;}
    if (! (rhs instanceof Thtmltemplate)){return false;}
    Thtmltemplate that = (Thtmltemplate) rhs;
    if (this.getPk() == null || that.getPk() == null){
        return false;}
    return (this.getPk().equals(that.getPk()));
}
/**Implementaciï¿½n del metodo hashCode de la la entidad Thtmltemplate
@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�n toString
*/
public String toString() {
	Field[]fs=this.getClass().getDeclaredFields();
	String data="";
	for(Field f:fs){
	 try{	
	 String name=f.getName();
	 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�n de la creaci�n de un bean en blancoThtmltemplate
*/
public Object createInstance() throws Exception{
 Thtmltemplate instance=new Thtmltemplate();	
 instance.setPk(new ThtmltemplateKey());
 return instance;
}
public Object cloneMe() throws Exception{
  Thtmltemplate p=(Thtmltemplate)this.clone();
  p.setPk((ThtmltemplateKey)this.pk.cloneMe());
  return p;
}
public Object getId() {
  return this.pk;
}
}
