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 TLOTEVALIDACAMPOSDETALLE*/
public class TvalidfieldsdetailKey    implements Serializable,Cloneable{
/** Nombre de la Tabla TLOTEVALIDACAMPOSDETALLE */
public static final String TABLE_NAME = "TLOTEVALIDACAMPOSDETALLE";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Numero del lote de transacciones consecutrivo para la fecha
*/
private Integer numerolote;

/**
* Fecha de ejecucion del lote de transacciones
*/
private Date fechalote;

/**
* Secuencia de la transaccion dentro del lote
*/
private Integer stransaccion;

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

/**Contructor por defecto*/
public TvalidfieldsdetailKey(){}
/**Contructor de TvalidfieldsdetailKey
@param pNumerolote Numero del lote de transacciones consecutrivo para la fecha
@param pFechalote Fecha de ejecucion del lote de transacciones
@param pStransaccion Secuencia de la transaccion dentro del lote
@param pSvalidacamposdetalle Numero consecutivo del registro
*/
public TvalidfieldsdetailKey(Integer pNumerolote,Date pFechalote,Integer pStransaccion,Integer pSvalidacamposdetalle){
 numerolote=pNumerolote;
 fechalote=pFechalote;
 stransaccion=pStransaccion;
 svalidacamposdetalle=pSvalidacamposdetalle;
}
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 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 STRANSACCION="STRANSACCION";
/**Obtiene el valor de stransaccion
@return valor de stransaccion*/
public Integer getStransaccion(){
  return stransaccion;
}
/**Fija el valor de stransaccion
@param pStransaccion nuevo Valor de stransaccion*/
public void setStransaccion(Integer pStransaccion){
  stransaccion=pStransaccion;
}

public static final String SVALIDACAMPOSDETALLE="SVALIDACAMPOSDETALLE";
/**Obtiene el valor de svalidacamposdetalle
@return valor de svalidacamposdetalle*/
public Integer getSvalidacamposdetalle(){
  return svalidacamposdetalle;
}
/**Fija el valor de svalidacamposdetalle
@param pSvalidacamposdetalle nuevo Valor de svalidacamposdetalle*/
public void setSvalidacamposdetalle(Integer pSvalidacamposdetalle){
  svalidacamposdetalle=pSvalidacamposdetalle;
}

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