package com.fitbank.hb.persistence.prod;

import java.io.Serializable;
import java.lang.reflect.Field;
import com.fitbank.common.TransportBean;

/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TDESTINOFONDOSID*/
public class Tdestinyfoundsid implements Serializable,TransportBean,Cloneable{
/** Nombre de la Tabla TDESTINOFONDOSID */
public static final String TABLE_NAME = "TDESTINOFONDOSID";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Clave primaria de la Entidad Tdestinyfoundsid
*/
private String pk;
/**
* Indica si corresponde al destino del credito y debe presentarse en la lista de valores para los creditos nuevos
*/
private String destinocredito;

/**Contructor por defecto*/
public Tdestinyfoundsid(){}
/**Contructor de Tdestinyfoundsid
@param pPk Clave Primaria del entity
*/
public Tdestinyfoundsid(String pPk){
 pk=pPk;
}
/**Entrega la Clave primaria de Tdestinyfoundsid
@return El objeto que referencia a la Clave primaria de Tdestinyfoundsid
*/
public String getPk(){
  return pk;
}
/**Fija un nuevo valor a la Clave primaria de Tdestinyfoundsid
@param pPk El objeto que referencia a la nueva Clave primaria de Tdestinyfoundsid
*/
public void setPk(String pPk){
  pk=pPk;
}
public static final String DESTINOCREDITO="DESTINOCREDITO";
/**Obtiene el valor de destinocredito
@return valor de destinocredito*/
public String getDestinocredito(){
  return destinocredito;
}
/**Fija el valor de destinocredito
@param pDestinocredito nuevo Valor de destinocredito*/
public void setDestinocredito(String pDestinocredito){
  destinocredito=pDestinocredito;
}

/**Implementacion de la comparacion de la entidad Tdestinyfoundsid
@param rhs Elemento de Comparacion
@return el resultado de la comparacion
*/
public boolean equals(Object rhs){
    if (rhs == null){return false;}
    if (! (rhs instanceof Tdestinyfoundsid)){return false;}
    Tdestinyfoundsid that = (Tdestinyfoundsid) 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 Tdestinyfoundsid
@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 blancoTdestinyfoundsid
*/
public Object createInstance() throws Exception{
 Tdestinyfoundsid instance=new Tdestinyfoundsid();	
 return instance;
}
public Object cloneMe() throws Exception{
  Tdestinyfoundsid p=(Tdestinyfoundsid)this.clone();
  return p;
}
}
