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 TGARANTIAINSPECCIONES*/
public class TwarrantyinspectionKey  extends AbstractExpire  implements Serializable,Cloneable,ManejaHistory{
/** Nombre de la Tabla TGARANTIAINSPECCIONES */
public static final String TABLE_NAME = "TGARANTIAINSPECCIONES";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Código de la garantia
*/
private String ccuenta_garantia;

/**
* Secuencia del registro
*/
private Integer secuencia;

/**
* Fecha hasta
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TwarrantyinspectionKey(){}
/**Contructor de TwarrantyinspectionKey
@param pCcuenta_garantia Código de la garantia
@param pSecuencia Secuencia del registro
@param pFhasta Fecha hasta
*/
public TwarrantyinspectionKey(String pCcuenta_garantia,Integer pSecuencia,Timestamp pFhasta){
 ccuenta_garantia=pCcuenta_garantia;
 secuencia=pSecuencia;
 fhasta=pFhasta;
}
public static final String CCUENTA_GARANTIA="CCUENTA_GARANTIA";
/**Obtiene el valor de ccuenta_garantia
@return valor de ccuenta_garantia*/
public String getCcuenta_garantia(){
  return ccuenta_garantia;
}
/**Fija el valor de ccuenta_garantia
@param pCcuenta_garantia nuevo Valor de ccuenta_garantia*/
public void setCcuenta_garantia(String pCcuenta_garantia){
  ccuenta_garantia=pCcuenta_garantia;
}

public static final String SECUENCIA="SECUENCIA";
/**Obtiene el valor de secuencia
@return valor de secuencia*/
public Integer getSecuencia(){
  return secuencia;
}
/**Fija el valor de secuencia
@param pSecuencia nuevo Valor de secuencia*/
public void setSecuencia(Integer pSecuencia){
  secuencia=pSecuencia;
}

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_CCUENTA_GARANTIA="CCUENTA_GARANTIA";
public static final String PK_SECUENCIA="SECUENCIA";
public static final String PK_FHASTA="FHASTA";
/**Implementaci�n de la comparaci�n de TwarrantyinspectionKey
@param o Objeto de comparaciï¿½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TwarrantyinspectionKey)){return false;}
  TwarrantyinspectionKey that = (TwarrantyinspectionKey) o;
  if (this.getCcuenta_garantia() == null || that.getCcuenta_garantia() == null){
      return false;
  }
  if (! this.getCcuenta_garantia().equals(that.getCcuenta_garantia())){
    return false;
  }
  if (this.getSecuencia() == null || that.getSecuencia() == null){
      return false;
  }
  if (! this.getSecuencia().equals(that.getSecuencia())){
    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 TwarrantyinspectionKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCcuenta_garantia() == null ? 0 : this.getCcuenta_garantia().hashCode());
    result = result * 37 + (this.getSecuencia() == null ? 0 : this.getSecuencia().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;
}
}
