package com.fitbank.hb.persistence.cash;

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

/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla VACUMULADODEPOSITOSPERSONA*/
public class VaccumulatedDepositsPerson implements Serializable,TransportBean,Cloneable{
/** Nombre de la Tabla VACUMULADODEPOSITOSPERSONA */
public static final String TABLE_NAME = "VACUMULADODEPOSITOSPERSONA";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Clave primaria de la Entidad VaccumulatedDepositsPerson
*/
private VaccumulatedDepositsPersonKey pk;
/**
*  
*/
private BigDecimal montoacumulado;

/**Contructor por defecto*/
public VaccumulatedDepositsPerson(){}
/**Contructor de VaccumulatedDepositsPerson
@param pPk Clave Primaria del entity
*/
public VaccumulatedDepositsPerson(VaccumulatedDepositsPersonKey pPk){
 pk=pPk;
}
/**Entrega la Clave primaria de VaccumulatedDepositsPerson
@return El objeto que referencia a la Clave primaria de VaccumulatedDepositsPerson
*/
public VaccumulatedDepositsPersonKey getPk(){
  return pk;
}
/**Fija un nuevo valor a la Clave primaria de VaccumulatedDepositsPerson
@param pPk El objeto que referencia a la nueva Clave primaria de VaccumulatedDepositsPerson
*/
public void setPk(VaccumulatedDepositsPersonKey pPk){
  pk=pPk;
}
public static final String MONTOACUMULADO="MONTOACUMULADO";
/**Obtiene el valor de montoacumulado
@return valor de montoacumulado*/
public BigDecimal getMontoacumulado(){
  return montoacumulado;
}
/**Fija el valor de montoacumulado
@param pMontoacumulado nuevo Valor de montoacumulado*/
public void setMontoacumulado(BigDecimal pMontoacumulado){
  montoacumulado=pMontoacumulado;
}

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