package com.fitbank.hb.persistence.lote;

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

/**Clase que hace referencia a la Clave Primaria de TLOTETRANSACCIONRUBROS*/
public class TitemtransactionloteKey    implements Serializable,Cloneable{
/** Nombre de la Tabla TLOTETRANSACCIONRUBROS */
public static final String TABLE_NAME = "TLOTETRANSACCIONRUBROS";
/** 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 a procesar
*/
private Integer numerolote;

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

/**
* Secuencia del rubro para la secuencia de la transaccion
*/
private Integer rubro;

/**Contructor por defecto*/
public TitemtransactionloteKey(){}
/**Contructor de TitemtransactionloteKey
@param pFechalote Fecha del lote de transacciones
@param pNumerolote Numero del lote de transacciones a procesar
@param pStransaccion Secuencia de la transaccion dentro del lote
@param pRubro Secuencia del rubro para la secuencia de la transaccion
*/
public TitemtransactionloteKey(Date pFechalote,Integer pNumerolote,Integer pStransaccion,Integer pRubro){
 fechalote=pFechalote;
 numerolote=pNumerolote;
 stransaccion=pStransaccion;
 rubro=pRubro;
}
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 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 RUBRO="RUBRO";
/**Obtiene el valor de rubro
@return valor de rubro*/
public Integer getRubro(){
  return rubro;
}
/**Fija el valor de rubro
@param pRubro nuevo Valor de rubro*/
public void setRubro(Integer pRubro){
  rubro=pRubro;
}

public static final String PK_FECHALOTE="FECHALOTE";
public static final String PK_NUMEROLOTE="NUMEROLOTE";
public static final String PK_STRANSACCION="STRANSACCION";
public static final String PK_RUBRO="RUBRO";
/**Implementaci?n de la comparaci?n de TitemtransactionloteKey
@param o Objeto de comparaci?n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TitemtransactionloteKey)){return false;}
  TitemtransactionloteKey that = (TitemtransactionloteKey) 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.getStransaccion() == null || that.getStransaccion() == null){
      return false;
  }
  if (! this.getStransaccion().equals(that.getStransaccion())){
    return false;
  }
  if (this.getRubro() == null || that.getRubro() == null){
      return false;
  }
  if (! this.getRubro().equals(that.getRubro())){
    return false;
  }
  return true;
}
/**Implementaci?n del m?todo hashCode bajo el patr?n de Bloch
@return hashCode de la instancia TitemtransactionloteKey
*/
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.getStransaccion() == null ? 0 : this.getStransaccion().hashCode());
    result = result * 37 + (this.getRubro() == null ? 0 : this.getRubro().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;
	}
}
