package com.fitbank.hb.persistence.person;

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

/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TPERSONARETENCIONFONDOSID*/
public class Tpersonfundsretentionid implements Serializable,TransportBean,Cloneable{
/** Nombre de la Tabla TPERSONARETENCIONFONDOSID */
public static final String TABLE_NAME = "TPERSONARETENCIONFONDOSID";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Clave primaria de la Entidad Tpersonfundsretentionid
*/
private TpersonfundsretentionidKey pk;
/**Contructor por defecto*/
public Tpersonfundsretentionid(){}
/**Contructor de Tpersonfundsretentionid
@param pPk Clave Primaria del entity
*/
public Tpersonfundsretentionid(TpersonfundsretentionidKey pPk){
 pk=pPk;
}
/**Entrega la Clave primaria de Tpersonfundsretentionid
@return El objeto que referencia a la Clave primaria de Tpersonfundsretentionid
*/
public TpersonfundsretentionidKey getPk(){
  return pk;
}
/**Fija un nuevo valor a la Clave primaria de Tpersonfundsretentionid
@param pPk El objeto que referencia a la nueva Clave primaria de Tpersonfundsretentionid
*/
public void setPk(TpersonfundsretentionidKey pPk){
  pk=pPk;
}
/**Implementacion de la comparacion de la entidad Tpersonfundsretentionid
@param rhs Elemento de Comparacion
@return el resultado de la comparacion
*/
public boolean equals(Object rhs){
    if (rhs == null){return false;}
    if (! (rhs instanceof Tpersonfundsretentionid)){return false;}
    Tpersonfundsretentionid that = (Tpersonfundsretentionid) 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 Tpersonfundsretentionid
@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 blancoTpersonfundsretentionid
*/
public Object createInstance() throws Exception{
 Tpersonfundsretentionid instance=new Tpersonfundsretentionid();	
 instance.setPk(new TpersonfundsretentionidKey());
 return instance;
}
public Object cloneMe() throws Exception{
  Tpersonfundsretentionid p=(Tpersonfundsretentionid)this.clone();
  p.setPk((TpersonfundsretentionidKey)this.pk.cloneMe());
  return p;
}
}
