package com.fitbank.hb.persistence.custodian;

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

/**
* Código de ubicación de la bóveda. Puede corresponder a un CSUCURSAL o un CPERSONA según el tipo de bóveda.
*/
private Integer cubicacion;

/**
* Fecha hasta la que está vigente el registro.
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TvaultlocationKey(){}
/**Contructor de TvaultlocationKey
@param pCboveda Código de bóveda.
@param pCubicacion Código de ubicación de la bóveda. Puede corresponder a un CSUCURSAL o un CPERSONA según el tipo de bóveda.
@param pFhasta Fecha hasta la que está vigente el registro.
*/
public TvaultlocationKey(String pCboveda,Integer pCubicacion,Timestamp pFhasta){
 cboveda=pCboveda;
 cubicacion=pCubicacion;
 fhasta=pFhasta;
}
public static final String CBOVEDA="CBOVEDA";
/**Obtiene el valor de cboveda
@return valor de cboveda*/
public String getCboveda(){
  return cboveda;
}
/**Fija el valor de cboveda
@param pCboveda nuevo Valor de cboveda*/
public void setCboveda(String pCboveda){
  cboveda=pCboveda;
}

public static final String CUBICACION="CUBICACION";
/**Obtiene el valor de cubicacion
@return valor de cubicacion*/
public Integer getCubicacion(){
  return cubicacion;
}
/**Fija el valor de cubicacion
@param pCubicacion nuevo Valor de cubicacion*/
public void setCubicacion(Integer pCubicacion){
  cubicacion=pCubicacion;
}

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