package com.fitbank.hb.persistence.prod;

import java.io.Serializable;
import java.lang.reflect.Field;

/**Clase que hace referencia a la Clave Primaria de TDESTINOFONDOSID*/
public class TdestinyfoundsidKey    implements Serializable,Cloneable{
/**
* HashCode asociado con la Instancia
*/
private volatile int hashValue = 0;
/**
* Version de la Clase
*/
private static final long serialVersionUID = 1L;
/**
* Codigo del subsistema
*/
private String csubsistema;

/**
* Tipos de prestamo ejemplo . Prestamos, microcredito, comercial consumo, hipotecario. 
*/
private String ctipomaduracion;

/**
* Codigo del destino de fondos de credito
*/
private String cdestinofondos;

/**Contructor por defecto*/
public TdestinyfoundsidKey(){}
/**Contructor de TdestinyfoundsidKey
@param pCsubsistema Codigo del subsistema
@param pCtipomaduracion Tipos de prestamo ejemplo . Prestamos, microcredito, comercial consumo, hipotecario. 
@param pCdestinofondos Codigo del destino de fondos de credito
*/
public TdestinyfoundsidKey(String pCsubsistema,String pCtipomaduracion,String pCdestinofondos){
 csubsistema=pCsubsistema;
 ctipomaduracion=pCtipomaduracion;
 cdestinofondos=pCdestinofondos;
}
/**Obtiene el valor de csubsistema
@return valor de csubsistema*/
public String getCsubsistema(){
  return csubsistema;
}
/**Fija el valor de csubsistema
@param pCsubsistema nuevo Valor de csubsistema*/
public void setCsubsistema(String pCsubsistema){
  csubsistema=pCsubsistema;
}

/**Obtiene el valor de ctipomaduracion
@return valor de ctipomaduracion*/
public String getCtipomaduracion(){
  return ctipomaduracion;
}
/**Fija el valor de ctipomaduracion
@param pCtipomaduracion nuevo Valor de ctipomaduracion*/
public void setCtipomaduracion(String pCtipomaduracion){
  ctipomaduracion=pCtipomaduracion;
}

/**Obtiene el valor de cdestinofondos
@return valor de cdestinofondos*/
public String getCdestinofondos(){
  return cdestinofondos;
}
/**Fija el valor de cdestinofondos
@param pCdestinofondos nuevo Valor de cdestinofondos*/
public void setCdestinofondos(String pCdestinofondos){
  cdestinofondos=pCdestinofondos;
}

/**Implementación de la comparación de TdestinyfoundsidKey
@param o Objeto de comparación
*/
public boolean equals(Object o){
  if (o == null)return false;
  if (! (o instanceof TdestinyfoundsidKey))return false;
  TdestinyfoundsidKey that = (TdestinyfoundsidKey) o;
  if (this.getCsubsistema() == null || that.getCsubsistema() == null){
      return false;
  }
  if (! this.getCsubsistema().equals(that.getCsubsistema())){
    return false;
  }
  if (this.getCtipomaduracion() == null || that.getCtipomaduracion() == null){
      return false;
  }
  if (! this.getCtipomaduracion().equals(that.getCtipomaduracion())){
    return false;
  }
  if (this.getCdestinofondos() == null || that.getCdestinofondos() == null){
      return false;
  }
  if (! this.getCdestinofondos().equals(that.getCdestinofondos())){
    return false;
  }
  return true;
}
/**Implementación del método hashCode bajo el patrón de Bloch
@return hashCode de la instancia TdestinyfoundsidKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCsubsistema() == null ? 0 : this.getCsubsistema().hashCode());
    result = result * 37 + (this.getCtipomaduracion() == null ? 0 : this.getCtipomaduracion().hashCode());
    result = result * 37 + (this.getCdestinofondos() == null ? 0 : this.getCdestinofondos().hashCode());
    this.hashValue = result;
  }
  return this.hashValue;
}
public Object cloneMe() throws Exception {
  return this.clone();
}
/**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+="pk."+name+"="+f.get(this)+";";
	 }catch(Exception e){
		 continue;
	 }
		}
		if(data.compareTo("")==0){
		data=super.toString();
		}
	return data;
	}
}
