package com.fitbank.hb.persistence.trans;

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

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

/**Contructor por defecto*/
public TreceivedmovementKey(){}
/**Contructor de TreceivedmovementKey
@param pNumeromensaje Numero de mensaje
@param pSrecibomovimiento Secuencia del recibo
*/
public TreceivedmovementKey(String pNumeromensaje,Integer pSrecibomovimiento){
 numeromensaje=pNumeromensaje;
 srecibomovimiento=pSrecibomovimiento;
}
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 SRECIBOMOVIMIENTO="SRECIBOMOVIMIENTO";
/**Obtiene el valor de srecibomovimiento
@return valor de srecibomovimiento*/
public Integer getSrecibomovimiento(){
  return srecibomovimiento;
}
/**Fija el valor de srecibomovimiento
@param pSrecibomovimiento nuevo Valor de srecibomovimiento*/
public void setSrecibomovimiento(Integer pSrecibomovimiento){
  srecibomovimiento=pSrecibomovimiento;
}

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