package com.fitbank.hb.persistence.gara;

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;

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

/**
* Codigo del tipo de bien
*/
private Integer ctipobien;

/**
* Codigo del tipo de documento requerido para respaldo de una garantia
*/
private Integer ctipodocumentogarantia;

/**
* Fecha hasta la que se encuentra vigente la desfinicion del requerimiento de un documento de respaldo de una garantia
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TdocumentrequiredguaranteeKey(){}
/**Contructor de TdocumentrequiredguaranteeKey
@param pCtipogarantia Codigo del tipo de garantia
@param pCtipobien Codigo del tipo de bien
@param pCtipodocumentogarantia Codigo del tipo de documento requerido para respaldo de una garantia
@param pFhasta Fecha hasta la que se encuentra vigente la desfinicion del requerimiento de un documento de respaldo de una garantia
*/
public TdocumentrequiredguaranteeKey(String pCtipogarantia,Integer pCtipobien,Integer pCtipodocumentogarantia,Timestamp pFhasta){
 ctipogarantia=pCtipogarantia;
 ctipobien=pCtipobien;
 ctipodocumentogarantia=pCtipodocumentogarantia;
 fhasta=pFhasta;
}
public static final String CTIPOGARANTIA="CTIPOGARANTIA";
/**Obtiene el valor de ctipogarantia
@return valor de ctipogarantia*/
public String getCtipogarantia(){
  return ctipogarantia;
}
/**Fija el valor de ctipogarantia
@param pCtipogarantia nuevo Valor de ctipogarantia*/
public void setCtipogarantia(String pCtipogarantia){
  ctipogarantia=pCtipogarantia;
}

public static final String CTIPOBIEN="CTIPOBIEN";
/**Obtiene el valor de ctipobien
@return valor de ctipobien*/
public Integer getCtipobien(){
  return ctipobien;
}
/**Fija el valor de ctipobien
@param pCtipobien nuevo Valor de ctipobien*/
public void setCtipobien(Integer pCtipobien){
  ctipobien=pCtipobien;
}

public static final String CTIPODOCUMENTOGARANTIA="CTIPODOCUMENTOGARANTIA";
/**Obtiene el valor de ctipodocumentogarantia
@return valor de ctipodocumentogarantia*/
public Integer getCtipodocumentogarantia(){
  return ctipodocumentogarantia;
}
/**Fija el valor de ctipodocumentogarantia
@param pCtipodocumentogarantia nuevo Valor de ctipodocumentogarantia*/
public void setCtipodocumentogarantia(Integer pCtipodocumentogarantia){
  ctipodocumentogarantia=pCtipodocumentogarantia;
}

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_CTIPOGARANTIA="CTIPOGARANTIA";
public static final String PK_CTIPOBIEN="CTIPOBIEN";
public static final String PK_CTIPODOCUMENTOGARANTIA="CTIPODOCUMENTOGARANTIA";
public static final String PK_FHASTA="FHASTA";
/**Implementaci�n de la comparaci�n de TdocumentrequiredguaranteeKey
@param o Objeto de comparaciï¿½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TdocumentrequiredguaranteeKey)){return false;}
  TdocumentrequiredguaranteeKey that = (TdocumentrequiredguaranteeKey) o;
  if (this.getCtipogarantia() == null || that.getCtipogarantia() == null){
      return false;
  }
  if (! this.getCtipogarantia().equals(that.getCtipogarantia())){
    return false;
  }
  if (this.getCtipobien() == null || that.getCtipobien() == null){
      return false;
  }
  if (! this.getCtipobien().equals(that.getCtipobien())){
    return false;
  }
  if (this.getCtipodocumentogarantia() == null || that.getCtipodocumentogarantia() == null){
      return false;
  }
  if (! this.getCtipodocumentogarantia().equals(that.getCtipodocumentogarantia())){
    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 TdocumentrequiredguaranteeKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCtipogarantia() == null ? 0 : this.getCtipogarantia().hashCode());
    result = result * 37 + (this.getCtipobien() == null ? 0 : this.getCtipobien().hashCode());
    result = result * 37 + (this.getCtipodocumentogarantia() == null ? 0 : this.getCtipodocumentogarantia().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;
}
}
