package com.fitbank.hb.persistence.person;

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

/**Clase que hace referencia a la Clave Primaria de TCALIFICACIONCREDITORANGOS*/
public class TrangescreditqualificationKey  extends AbstractExpire  implements Serializable,Cloneable,ManejaHistory{
/** Nombre de la Tabla TCALIFICACIONCREDITORANGOS */
public static final String TABLE_NAME = "TCALIFICACIONCREDITORANGOS";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Codigo de la calificacion de credito para evaluar el riesgo crediticio de una persona
*/
private String ccalificacioncredito;

/**
* Codigos del estado de la operacion de credito
*/
private String cestadooperacion;

/**
* Codigo del subsistema
*/
private String csubsistema;

/**
* Codigo de la clasificacion contable de los productos, ejemplo Prestamos, microcredito, comercial consumo, hipotecario. 
*/
private String cclasificacioncontable;

/**
* Fecha hasta la que esta vigente a definicion de la rangos de la calificacion de credito
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TrangescreditqualificationKey(){}
/**Contructor de TrangescreditqualificationKey
@param pCcalificacioncredito Codigo de la calificacion de credito para evaluar el riesgo crediticio de una persona
@param pCestadooperacion Codigos del estado de la operacion de credito
@param pCsubsistema Codigo del subsistema
@param pCclasificacioncontable Codigo de la clasificacion contable de los productos, ejemplo Prestamos, microcredito, comercial consumo, hipotecario. 
@param pFhasta Fecha hasta la que esta vigente a definicion de la rangos de la calificacion de credito
*/
public TrangescreditqualificationKey(String pCcalificacioncredito,String pCestadooperacion,String pCsubsistema,String pCclasificacioncontable,Timestamp pFhasta){
 ccalificacioncredito=pCcalificacioncredito;
 cestadooperacion=pCestadooperacion;
 csubsistema=pCsubsistema;
 cclasificacioncontable=pCclasificacioncontable;
 fhasta=pFhasta;
}
public static final String CCALIFICACIONCREDITO="CCALIFICACIONCREDITO";
/**Obtiene el valor de ccalificacioncredito
@return valor de ccalificacioncredito*/
public String getCcalificacioncredito(){
  return ccalificacioncredito;
}
/**Fija el valor de ccalificacioncredito
@param pCcalificacioncredito nuevo Valor de ccalificacioncredito*/
public void setCcalificacioncredito(String pCcalificacioncredito){
  ccalificacioncredito=pCcalificacioncredito;
}

public static final String CESTADOOPERACION="CESTADOOPERACION";
/**Obtiene el valor de cestadooperacion
@return valor de cestadooperacion*/
public String getCestadooperacion(){
  return cestadooperacion;
}
/**Fija el valor de cestadooperacion
@param pCestadooperacion nuevo Valor de cestadooperacion*/
public void setCestadooperacion(String pCestadooperacion){
  cestadooperacion=pCestadooperacion;
}

public static final String CSUBSISTEMA="CSUBSISTEMA";
/**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;
}

public static final String CCLASIFICACIONCONTABLE="CCLASIFICACIONCONTABLE";
/**Obtiene el valor de cclasificacioncontable
@return valor de cclasificacioncontable*/
public String getCclasificacioncontable(){
  return cclasificacioncontable;
}
/**Fija el valor de cclasificacioncontable
@param pCclasificacioncontable nuevo Valor de cclasificacioncontable*/
public void setCclasificacioncontable(String pCclasificacioncontable){
  cclasificacioncontable=pCclasificacioncontable;
}

public static final String FHASTA="FHASTA";
/**Obtiene el valor de fhasta
@return valor de fhasta*/
public Timestamp getFhasta(){
  return fhasta;
}
/**Fija el valor de fhasta
@param pFhasta nuevo Valor de fhasta*/
public void setFhasta(Timestamp pFhasta){
  fhasta=pFhasta;
}

public static final String PK_CCALIFICACIONCREDITO="CCALIFICACIONCREDITO";
public static final String PK_CESTADOOPERACION="CESTADOOPERACION";
public static final String PK_CSUBSISTEMA="CSUBSISTEMA";
public static final String PK_CCLASIFICACIONCONTABLE="CCLASIFICACIONCONTABLE";
public static final String PK_FHASTA="FHASTA";
/**Implementaci?n de la comparaci?n de TrangescreditqualificationKey
@param o Objeto de comparaci?n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TrangescreditqualificationKey)){return false;}
  TrangescreditqualificationKey that = (TrangescreditqualificationKey) o;
  if (this.getCcalificacioncredito() == null || that.getCcalificacioncredito() == null){
      return false;
  }
  if (! this.getCcalificacioncredito().equals(that.getCcalificacioncredito())){
    return false;
  }
  if (this.getCestadooperacion() == null || that.getCestadooperacion() == null){
      return false;
  }
  if (! this.getCestadooperacion().equals(that.getCestadooperacion())){
    return false;
  }
  if (this.getCsubsistema() == null || that.getCsubsistema() == null){
      return false;
  }
  if (! this.getCsubsistema().equals(that.getCsubsistema())){
    return false;
  }
  if (this.getCclasificacioncontable() == null || that.getCclasificacioncontable() == null){
      return false;
  }
  if (! this.getCclasificacioncontable().equals(that.getCclasificacioncontable())){
    return false;
  }
  if (this.getFhasta() == null || that.getFhasta() == null){
      return false;
  }
  if (! this.getFhasta().equals(that.getFhasta())){
    return false;
  }
  return true;
}
/**Implementaci?n del m?todo hashCode bajo el patr?n de Bloch
@return hashCode de la instancia TrangescreditqualificationKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCcalificacioncredito() == null ? 0 : this.getCcalificacioncredito().hashCode());
    result = result * 37 + (this.getCestadooperacion() == null ? 0 : this.getCestadooperacion().hashCode());
    result = result * 37 + (this.getCsubsistema() == null ? 0 : this.getCsubsistema().hashCode());
    result = result * 37 + (this.getCclasificacioncontable() == null ? 0 : this.getCclasificacioncontable().hashCode());
    result = result * 37 + (this.getFhasta() == null ? 0 : this.getFhasta().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;
	}
public Object getId() {
  return null;
}
}
