package com.fitbank.hb.persistence.person;

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

/**Clase que hace referencia a la Clave Primaria de TPERSONASBOLETINADAS*/
public class TbulletinpersonKey  extends AbstractExpire  implements Serializable,Cloneable,ManejaHistory{
/** Nombre de la Tabla TPERSONASBOLETINADAS */
public static final String TABLE_NAME = "TPERSONASBOLETINADAS";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Numero de cedula, pasaporte o ruc de la persona boletinada
*/
private String identificacion;

/**
* Codigo del tipo de lista de control de una persona natural o juridica
*/
private String clistacontrol;

/**
* Fecha hasta la que estan vigentes los datos de una persona expuesta publicamente
*/
private Timestamp fhasta;

/**
* Fecha de proceso en la que se realiza la subida del archivo
*/
private Date fproceso;

/**Contructor por defecto*/
public TbulletinpersonKey(){}
/**Contructor de TbulletinpersonKey
@param pIdentificacion Numero de cedula, pasaporte o ruc de la persona boletinada
@param pClistacontrol Codigo del tipo de lista de control de una persona natural o juridica
@param pFhasta Fecha hasta la que estan vigentes los datos de una persona expuesta publicamente
@param pFproceso Fecha de proceso en la que se realiza la subida del archivo
*/
public TbulletinpersonKey(String pIdentificacion,String pClistacontrol,Timestamp pFhasta,Date pFproceso){
 identificacion=pIdentificacion;
 clistacontrol=pClistacontrol;
 fhasta=pFhasta;
 fproceso=pFproceso;
}
public static final String IDENTIFICACION="IDENTIFICACION";
/**Obtiene el valor de identificacion
@return valor de identificacion*/
public String getIdentificacion(){
  return identificacion;
}
/**Fija el valor de identificacion
@param pIdentificacion nuevo Valor de identificacion*/
public void setIdentificacion(String pIdentificacion){
  identificacion=pIdentificacion;
}

public static final String CLISTACONTROL="CLISTACONTROL";
/**Obtiene el valor de clistacontrol
@return valor de clistacontrol*/
public String getClistacontrol(){
  return clistacontrol;
}
/**Fija el valor de clistacontrol
@param pClistacontrol nuevo Valor de clistacontrol*/
public void setClistacontrol(String pClistacontrol){
  clistacontrol=pClistacontrol;
}

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 FPROCESO="FPROCESO";
/**Obtiene el valor de fproceso
@return valor de fproceso*/
public Date getFproceso(){
  return fproceso;
}
/**Fija el valor de fproceso
@param pFproceso nuevo Valor de fproceso*/
public void setFproceso(Date pFproceso){
  fproceso=pFproceso;
}

public static final String PK_IDENTIFICACION="IDENTIFICACION";
public static final String PK_CLISTACONTROL="CLISTACONTROL";
public static final String PK_FHASTA="FHASTA";
public static final String PK_FPROCESO="FPROCESO";
/**Implementaci�n de la comparaci�n de TbulletinpersonKey
@param o Objeto de comparaciï¿½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TbulletinpersonKey)){return false;}
  TbulletinpersonKey that = (TbulletinpersonKey) o;
  if (this.getIdentificacion() == null || that.getIdentificacion() == null){
      return false;
  }
  if (! this.getIdentificacion().equals(that.getIdentificacion())){
    return false;
  }
  if (this.getClistacontrol() == null || that.getClistacontrol() == null){
      return false;
  }
  if (! this.getClistacontrol().equals(that.getClistacontrol())){
    return false;
  }
  if (this.getFhasta() == null || that.getFhasta() == null){
      return false;
  }
  if (! this.getFhasta().equals(that.getFhasta())){
    return false;
  }
  if (this.getFproceso() == null || that.getFproceso() == null){
      return false;
  }
  if (! this.getFproceso().equals(that.getFproceso())){
    return false;
  }
  return true;
}
/**Implementaci�n del m�todo hashCode bajo el patr�n de Bloch
@return hashCode de la instancia TbulletinpersonKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getIdentificacion() == null ? 0 : this.getIdentificacion().hashCode());
    result = result * 37 + (this.getClistacontrol() == null ? 0 : this.getClistacontrol().hashCode());
    result = result * 37 + (this.getFhasta() == null ? 0 : this.getFhasta().hashCode());
    result = result * 37 + (this.getFproceso() == null ? 0 : this.getFproceso().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;
}
}
