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 TPERSONASEXPOSICIONPUBLICA*/
public class TpublicexpositionpersonKey  extends AbstractExpire  implements Serializable,Cloneable,ManejaHistory{
/** Nombre de la Tabla TPERSONASEXPOSICIONPUBLICA */
public static final String TABLE_NAME = "TPERSONASEXPOSICIONPUBLICA";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Fecha de registro o ingreso de la informacion 
*/
private Date fingreso;

/**
* Numero de cedula, pasaporte o ruc de la persona expuesta publicamente
*/
private String identificacion;

/**
* Codigo del tipo de persona
*/
private String ctipopersona;

/**
* Codigo del tipo de documento de personas naturales o juridicas
*/
private Integer ctipodocumentopersona;

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

/**Contructor por defecto*/
public TpublicexpositionpersonKey(){}
/**Contructor de TpublicexpositionpersonKey
@param pFingreso Fecha de registro o ingreso de la informacion 
@param pIdentificacion Numero de cedula, pasaporte o ruc de la persona expuesta publicamente
@param pCtipopersona Codigo del tipo de persona
@param pCtipodocumentopersona Codigo del tipo de documento de personas naturales o juridicas
@param pFhasta Fecha hasta la que estan vigentes los datos de una persona expuesta publicamente
*/
public TpublicexpositionpersonKey(Date pFingreso,String pIdentificacion,String pCtipopersona,Integer pCtipodocumentopersona,Timestamp pFhasta){
 fingreso=pFingreso;
 identificacion=pIdentificacion;
 ctipopersona=pCtipopersona;
 ctipodocumentopersona=pCtipodocumentopersona;
 fhasta=pFhasta;
}
public static final String FINGRESO="FINGRESO";
/**Obtiene el valor de fingreso
@return valor de fingreso*/
public Date getFingreso(){
  return fingreso;
}
/**Fija el valor de fingreso
@param pFingreso nuevo Valor de fingreso*/
public void setFingreso(Date pFingreso){
  fingreso=pFingreso;
}

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 CTIPOPERSONA="CTIPOPERSONA";
/**Obtiene el valor de ctipopersona
@return valor de ctipopersona*/
public String getCtipopersona(){
  return ctipopersona;
}
/**Fija el valor de ctipopersona
@param pCtipopersona nuevo Valor de ctipopersona*/
public void setCtipopersona(String pCtipopersona){
  ctipopersona=pCtipopersona;
}

public static final String CTIPODOCUMENTOPERSONA="CTIPODOCUMENTOPERSONA";
/**Obtiene el valor de ctipodocumentopersona
@return valor de ctipodocumentopersona*/
public Integer getCtipodocumentopersona(){
  return ctipodocumentopersona;
}
/**Fija el valor de ctipodocumentopersona
@param pCtipodocumentopersona nuevo Valor de ctipodocumentopersona*/
public void setCtipodocumentopersona(Integer pCtipodocumentopersona){
  ctipodocumentopersona=pCtipodocumentopersona;
}

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_FINGRESO="FINGRESO";
public static final String PK_IDENTIFICACION="IDENTIFICACION";
public static final String PK_CTIPOPERSONA="CTIPOPERSONA";
public static final String PK_CTIPODOCUMENTOPERSONA="CTIPODOCUMENTOPERSONA";
public static final String PK_FHASTA="FHASTA";
/**Implementaciï¿½n de la comparaciï¿½n de TpublicexpositionpersonKey
@param o Objeto de comparaciÃ¯Â¿Â½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TpublicexpositionpersonKey)){return false;}
  TpublicexpositionpersonKey that = (TpublicexpositionpersonKey) o;
  if (this.getFingreso() == null || that.getFingreso() == null){
      return false;
  }
  if (! this.getFingreso().equals(that.getFingreso())){
    return false;
  }
  if (this.getIdentificacion() == null || that.getIdentificacion() == null){
      return false;
  }
  if (! this.getIdentificacion().equals(that.getIdentificacion())){
    return false;
  }
  if (this.getCtipopersona() == null || that.getCtipopersona() == null){
      return false;
  }
  if (! this.getCtipopersona().equals(that.getCtipopersona())){
    return false;
  }
  if (this.getCtipodocumentopersona() == null || that.getCtipodocumentopersona() == null){
      return false;
  }
  if (! this.getCtipodocumentopersona().equals(that.getCtipodocumentopersona())){
    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 TpublicexpositionpersonKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getFingreso() == null ? 0 : this.getFingreso().hashCode());
    result = result * 37 + (this.getIdentificacion() == null ? 0 : this.getIdentificacion().hashCode());
    result = result * 37 + (this.getCtipopersona() == null ? 0 : this.getCtipopersona().hashCode());
    result = result * 37 + (this.getCtipodocumentopersona() == null ? 0 : this.getCtipodocumentopersona().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;
}
}
