package com.fitbank.hb.persistence.trans;

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

/**Clase que hace referencia a la Clave Primaria de TTRANSACCIONESENVIADAS*/
public class TdispatchedtransactionKey    implements Serializable,Cloneable{
/** Nombre de la Tabla TTRANSACCIONESENVIADAS */
public static final String TABLE_NAME = "TTRANSACCIONESENVIADAS";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Numero de mensaje
*/
private String numeromensaje;

/**
* Secuencia de la transaccion para el numero de mensaje
*/
private Integer stransaccion;

/**
* Fecha (AAAAMM) para particionamiento de la tabla asada en la fecha contable hasta
*/
private String fparticion;

/**Contructor por defecto*/
public TdispatchedtransactionKey(){}
/**Contructor de TdispatchedtransactionKey
@param pNumeromensaje Numero de mensaje
@param pStransaccion Secuencia de la transaccion para el numero de mensaje
@param pFparticion Fecha (AAAAMM) para particionamiento de la tabla asada en la fecha contable hasta
*/
public TdispatchedtransactionKey(String pNumeromensaje,Integer pStransaccion,String pFparticion){
 numeromensaje=pNumeromensaje;
 stransaccion=pStransaccion;
 fparticion=pFparticion;
}
public static final String NUMEROMENSAJE="NUMEROMENSAJE";
/**Obtiene el valor de numeromensaje
@return valor de numeromensaje*/
public String getNumeromensaje(){
  return numeromensaje;
}
/**Fija el valor de numeromensaje
@param pNumeromensaje nuevo Valor de numeromensaje*/
public void setNumeromensaje(String pNumeromensaje){
  numeromensaje=pNumeromensaje;
}

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 FPARTICION="FPARTICION";
/**Obtiene el valor de fparticion
@return valor de fparticion*/
public String getFparticion(){
  return fparticion;
}
/**Fija el valor de fparticion
@param pFparticion nuevo Valor de fparticion*/
public void setFparticion(String pFparticion){
  fparticion=pFparticion;
}

public static final String PK_NUMEROMENSAJE="NUMEROMENSAJE";
public static final String PK_STRANSACCION="STRANSACCION";
public static final String PK_FPARTICION="FPARTICION";
/**Implementaci?n de la comparaci?n de TdispatchedtransactionKey
@param o Objeto de comparaci?n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TdispatchedtransactionKey)){return false;}
  TdispatchedtransactionKey that = (TdispatchedtransactionKey) o;
  if (this.getNumeromensaje() == null || that.getNumeromensaje() == null){
      return false;
  }
  if (! this.getNumeromensaje().equals(that.getNumeromensaje())){
    return false;
  }
  if (this.getStransaccion() == null || that.getStransaccion() == null){
      return false;
  }
  if (! this.getStransaccion().equals(that.getStransaccion())){
    return false;
  }
  if (this.getFparticion() == null || that.getFparticion() == null){
      return false;
  }
  if (! this.getFparticion().equals(that.getFparticion())){
    return false;
  }
  return true;
}
/**Implementaci?n del m?todo hashCode bajo el patr?n de Bloch
@return hashCode de la instancia TdispatchedtransactionKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getNumeromensaje() == null ? 0 : this.getNumeromensaje().hashCode());
    result = result * 37 + (this.getStransaccion() == null ? 0 : this.getStransaccion().hashCode());
    result = result * 37 + (this.getFparticion() == null ? 0 : this.getFparticion().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;
	}
}
