package com.fitbank.hb.persistence.lote;

import java.io.Serializable;
import java.lang.reflect.Field;
import java.sql.Date;

/**Clase que hace referencia a la Clave Primaria de TLOTETRANSACCIONESARCHIVO*/
public class TlotetransactionsfileKey    implements Serializable,Cloneable{
/** Nombre de la Tabla TLOTETRANSACCIONESARCHIVO */
public static final String TABLE_NAME = "TLOTETRANSACCIONESARCHIVO";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Fecha del lote de transacciones
*/
private Date fechalote;

/**
* Numero del lote de transacciones consecutrivo para la fecha
*/
private Integer numerolote;

/**
* Numero consecutivo del registro
*/
private Integer secuencia;

/**Contructor por defecto*/
public TlotetransactionsfileKey(){}
/**Contructor de TlotetransactionsfileKey
@param pFechalote Fecha del lote de transacciones
@param pNumerolote Numero del lote de transacciones consecutrivo para la fecha
@param pSecuencia Numero consecutivo del registro
*/
public TlotetransactionsfileKey(Date pFechalote,Integer pNumerolote,Integer pSecuencia){
 fechalote=pFechalote;
 numerolote=pNumerolote;
 secuencia=pSecuencia;
}
public static final String FECHALOTE="FECHALOTE";
/**Obtiene el valor de fechalote
@return valor de fechalote*/
public Date getFechalote(){
  return fechalote;
}
/**Fija el valor de fechalote
@param pFechalote nuevo Valor de fechalote*/
public void setFechalote(Date pFechalote){
  fechalote=pFechalote;
}

public static final String NUMEROLOTE="NUMEROLOTE";
/**Obtiene el valor de numerolote
@return valor de numerolote*/
public Integer getNumerolote(){
  return numerolote;
}
/**Fija el valor de numerolote
@param pNumerolote nuevo Valor de numerolote*/
public void setNumerolote(Integer pNumerolote){
  numerolote=pNumerolote;
}

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 PK_FECHALOTE="FECHALOTE";
public static final String PK_NUMEROLOTE="NUMEROLOTE";
public static final String PK_SECUENCIA="SECUENCIA";
/**Implementaci�n de la comparaci�n de TlotetransactionsfileKey
@param o Objeto de comparaciï¿½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TlotetransactionsfileKey)){return false;}
  TlotetransactionsfileKey that = (TlotetransactionsfileKey) o;
  if (this.getFechalote() == null || that.getFechalote() == null){
      return false;
  }
  if (! this.getFechalote().equals(that.getFechalote())){
    return false;
  }
  if (this.getNumerolote() == null || that.getNumerolote() == null){
      return false;
  }
  if (! this.getNumerolote().equals(that.getNumerolote())){
    return false;
  }
  if (this.getSecuencia() == null || that.getSecuencia() == null){
      return false;
  }
  if (! this.getSecuencia().equals(that.getSecuencia())){
    return false;
  }
  return true;
}
/**Implementaci�n del m�todo hashCode bajo el patr�n de Bloch
@return hashCode de la instancia TlotetransactionsfileKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getFechalote() == null ? 0 : this.getFechalote().hashCode());
    result = result * 37 + (this.getNumerolote() == null ? 0 : this.getNumerolote().hashCode());
    result = result * 37 + (this.getSecuencia() == null ? 0 : this.getSecuencia().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;
	}
}
