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

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

/**
* Codigo de la compania
*/
private Integer cpersona_compania;

/**
* Numero de renovacion de una garantia
*/
private Integer numerorenovacion;

/**
* Codigo del tipo de garantia
*/
private String ctipogarantia;

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

/**
* Codigo del tipo de costo del detalle del bien de una garantia
*/
private Integer ctipocosto;

/**
* Secuencia del detalle de avaluos
*/
private Integer sdetalleavaluo;

/**Contructor por defecto*/
public TaccountdetailavaluoguaranteeKey(){}
/**Contructor de TaccountdetailavaluoguaranteeKey
@param pCcuenta Numero de cuenta de la garantia
@param pFhasta Fecha hasta la que estan vigentes los datos de una garantia
@param pCpersona_compania Codigo de la compania
@param pNumerorenovacion Numero de renovacion de una garantia
@param pCtipogarantia Codigo del tipo de garantia
@param pCtipobien Codigo del tipo de bien de la garantia
@param pCtipocosto Codigo del tipo de costo del detalle del bien de una garantia
@param pSdetalleavaluo Secuencia del detalle de avaluos
*/
public TaccountdetailavaluoguaranteeKey(String pCcuenta,Timestamp pFhasta,Integer pCpersona_compania,Integer pNumerorenovacion,String pCtipogarantia,Integer pCtipobien,Integer pCtipocosto,Integer pSdetalleavaluo){
 ccuenta=pCcuenta;
 fhasta=pFhasta;
 cpersona_compania=pCpersona_compania;
 numerorenovacion=pNumerorenovacion;
 ctipogarantia=pCtipogarantia;
 ctipobien=pCtipobien;
 ctipocosto=pCtipocosto;
 sdetalleavaluo=pSdetalleavaluo;
}
public static final String CCUENTA="CCUENTA";
/**Obtiene el valor de ccuenta
@return valor de ccuenta*/
public String getCcuenta(){
  return ccuenta;
}
/**Fija el valor de ccuenta
@param pCcuenta nuevo Valor de ccuenta*/
public void setCcuenta(String pCcuenta){
  ccuenta=pCcuenta;
}

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 CPERSONA_COMPANIA="CPERSONA_COMPANIA";
/**Obtiene el valor de cpersona_compania
@return valor de cpersona_compania*/
public Integer getCpersona_compania(){
  return cpersona_compania;
}
/**Fija el valor de cpersona_compania
@param pCpersona_compania nuevo Valor de cpersona_compania*/
public void setCpersona_compania(Integer pCpersona_compania){
  cpersona_compania=pCpersona_compania;
}

public static final String NUMERORENOVACION="NUMERORENOVACION";
/**Obtiene el valor de numerorenovacion
@return valor de numerorenovacion*/
public Integer getNumerorenovacion(){
  return numerorenovacion;
}
/**Fija el valor de numerorenovacion
@param pNumerorenovacion nuevo Valor de numerorenovacion*/
public void setNumerorenovacion(Integer pNumerorenovacion){
  numerorenovacion=pNumerorenovacion;
}

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 CTIPOCOSTO="CTIPOCOSTO";
/**Obtiene el valor de ctipocosto
@return valor de ctipocosto*/
public Integer getCtipocosto(){
  return ctipocosto;
}
/**Fija el valor de ctipocosto
@param pCtipocosto nuevo Valor de ctipocosto*/
public void setCtipocosto(Integer pCtipocosto){
  ctipocosto=pCtipocosto;
}

public static final String SDETALLEAVALUO="SDETALLEAVALUO";
/**Obtiene el valor de sdetalleavaluo
@return valor de sdetalleavaluo*/
public Integer getSdetalleavaluo(){
  return sdetalleavaluo;
}
/**Fija el valor de sdetalleavaluo
@param pSdetalleavaluo nuevo Valor de sdetalleavaluo*/
public void setSdetalleavaluo(Integer pSdetalleavaluo){
  sdetalleavaluo=pSdetalleavaluo;
}

public static final String PK_CCUENTA="CCUENTA";
public static final String PK_FHASTA="FHASTA";
public static final String PK_CPERSONA_COMPANIA="CPERSONA_COMPANIA";
public static final String PK_NUMERORENOVACION="NUMERORENOVACION";
public static final String PK_CTIPOGARANTIA="CTIPOGARANTIA";
public static final String PK_CTIPOBIEN="CTIPOBIEN";
public static final String PK_CTIPOCOSTO="CTIPOCOSTO";
public static final String PK_SDETALLEAVALUO="SDETALLEAVALUO";
/**Implementaciï¿½n de la comparaciï¿½n de TaccountdetailavaluoguaranteeKey
@param o Objeto de comparaciÃ¯Â¿Â½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TaccountdetailavaluoguaranteeKey)){return false;}
  TaccountdetailavaluoguaranteeKey that = (TaccountdetailavaluoguaranteeKey) o;
  if (this.getCcuenta() == null || that.getCcuenta() == null){
      return false;
  }
  if (! this.getCcuenta().equals(that.getCcuenta())){
    return false;
  }
  if (this.getFhasta() == null || that.getFhasta() == null){
      return false;
  }
  if (! this.getFhasta().equals(that.getFhasta())){
    return false;
  }
  if (this.getCpersona_compania() == null || that.getCpersona_compania() == null){
      return false;
  }
  if (! this.getCpersona_compania().equals(that.getCpersona_compania())){
    return false;
  }
  if (this.getNumerorenovacion() == null || that.getNumerorenovacion() == null){
      return false;
  }
  if (! this.getNumerorenovacion().equals(that.getNumerorenovacion())){
    return false;
  }
  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.getCtipocosto() == null || that.getCtipocosto() == null){
      return false;
  }
  if (! this.getCtipocosto().equals(that.getCtipocosto())){
    return false;
  }
  if (this.getSdetalleavaluo() == null || that.getSdetalleavaluo() == null){
      return false;
  }
  if (! this.getSdetalleavaluo().equals(that.getSdetalleavaluo())){
    return false;
  }
  return true;
}
/**Implementaciï¿½n del mï¿½todo hashCode bajo el patrï¿½n de Bloch
@return hashCode de la instancia TaccountdetailavaluoguaranteeKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCcuenta() == null ? 0 : this.getCcuenta().hashCode());
    result = result * 37 + (this.getFhasta() == null ? 0 : this.getFhasta().hashCode());
    result = result * 37 + (this.getCpersona_compania() == null ? 0 : this.getCpersona_compania().hashCode());
    result = result * 37 + (this.getNumerorenovacion() == null ? 0 : this.getNumerorenovacion().hashCode());
    result = result * 37 + (this.getCtipogarantia() == null ? 0 : this.getCtipogarantia().hashCode());
    result = result * 37 + (this.getCtipobien() == null ? 0 : this.getCtipobien().hashCode());
    result = result * 37 + (this.getCtipocosto() == null ? 0 : this.getCtipocosto().hashCode());
    result = result * 37 + (this.getSdetalleavaluo() == null ? 0 : this.getSdetalleavaluo().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;
}
}
