package com.fitbank.hb.persistence.gene;

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

/**Clase que hace referencia a la Clave Primaria de TBANCAZONAREGLAS*/
public class TbankzonerulesKey  extends AbstractExpire  implements Serializable,Cloneable,ManejaHistory{
/** Nombre de la Tabla TBANCAZONAREGLAS */
public static final String TABLE_NAME = "TBANCAZONAREGLAS";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Codigo del criterio de evaluacion de credito
*/
private String ccriterioevaluacion;

/**
* Codigo del tipo de banca.
*/
private String ctipobanca;

/**
* Codigo de la zona negocio del usuario.
*/
private String zonanegocio;

/**
* Fecha hasta la que está vigente la definición de una garantía por sublimite
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TbankzonerulesKey(){}
/**Contructor de TbankzonerulesKey
@param pCcriterioevaluacion Codigo del criterio de evaluacion de credito
@param pCtipobanca Codigo del tipo de banca.
@param pZonanegocio Codigo de la zona negocio del usuario.
@param pFhasta Fecha hasta la que está vigente la definición de una garantía por sublimite
*/
public TbankzonerulesKey(String pCcriterioevaluacion,String pCtipobanca,String pZonanegocio,Timestamp pFhasta){
 ccriterioevaluacion=pCcriterioevaluacion;
 ctipobanca=pCtipobanca;
 zonanegocio=pZonanegocio;
 fhasta=pFhasta;
}
public static final String CCRITERIOEVALUACION="CCRITERIOEVALUACION";
/**Obtiene el valor de ccriterioevaluacion
@return valor de ccriterioevaluacion*/
public String getCcriterioevaluacion(){
  return ccriterioevaluacion;
}
/**Fija el valor de ccriterioevaluacion
@param pCcriterioevaluacion nuevo Valor de ccriterioevaluacion*/
public void setCcriterioevaluacion(String pCcriterioevaluacion){
  ccriterioevaluacion=pCcriterioevaluacion;
}

public static final String CTIPOBANCA="CTIPOBANCA";
/**Obtiene el valor de ctipobanca
@return valor de ctipobanca*/
public String getCtipobanca(){
  return ctipobanca;
}
/**Fija el valor de ctipobanca
@param pCtipobanca nuevo Valor de ctipobanca*/
public void setCtipobanca(String pCtipobanca){
  ctipobanca=pCtipobanca;
}

public static final String ZONANEGOCIO="ZONANEGOCIO";
/**Obtiene el valor de zonanegocio
@return valor de zonanegocio*/
public String getZonanegocio(){
  return zonanegocio;
}
/**Fija el valor de zonanegocio
@param pZonanegocio nuevo Valor de zonanegocio*/
public void setZonanegocio(String pZonanegocio){
  zonanegocio=pZonanegocio;
}

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_CCRITERIOEVALUACION="CCRITERIOEVALUACION";
public static final String PK_CTIPOBANCA="CTIPOBANCA";
public static final String PK_ZONANEGOCIO="ZONANEGOCIO";
public static final String PK_FHASTA="FHASTA";
/**Implementaci�n de la comparaci�n de TbankzonerulesKey
@param o Objeto de comparaciï¿½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TbankzonerulesKey)){return false;}
  TbankzonerulesKey that = (TbankzonerulesKey) o;
  if (this.getCcriterioevaluacion() == null || that.getCcriterioevaluacion() == null){
      return false;
  }
  if (! this.getCcriterioevaluacion().equals(that.getCcriterioevaluacion())){
    return false;
  }
  if (this.getCtipobanca() == null || that.getCtipobanca() == null){
      return false;
  }
  if (! this.getCtipobanca().equals(that.getCtipobanca())){
    return false;
  }
  if (this.getZonanegocio() == null || that.getZonanegocio() == null){
      return false;
  }
  if (! this.getZonanegocio().equals(that.getZonanegocio())){
    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 TbankzonerulesKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCcriterioevaluacion() == null ? 0 : this.getCcriterioevaluacion().hashCode());
    result = result * 37 + (this.getCtipobanca() == null ? 0 : this.getCtipobanca().hashCode());
    result = result * 37 + (this.getZonanegocio() == null ? 0 : this.getZonanegocio().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;
}
}
