package com.fitbank.hb.persistence.safe;

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

/**Clase que hace referencia a la Clave Primaria de TLOGNOTIFICACIONES*/
public class TnotificationlogKey    implements Serializable,Cloneable{
/** Nombre de la Tabla TLOGNOTIFICACIONES */
public static final String TABLE_NAME = "TLOGNOTIFICACIONES";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Número del mensaje con el que se genera la notificación
*/
private String numeromensaje;

/**
* 
*/
private Integer snotificacion;

/**Contructor por defecto*/
public TnotificationlogKey(){}
/**Contructor de TnotificationlogKey
@param pNumeromensaje Número del mensaje con el que se genera la notificación
@param pSnotificacion null
*/
public TnotificationlogKey(String pNumeromensaje,Integer pSnotificacion){
 numeromensaje=pNumeromensaje;
 snotificacion=pSnotificacion;
}
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 SNOTIFICACION="SNOTIFICACION";
/**Obtiene el valor de snotificacion
@return valor de snotificacion*/
public Integer getSnotificacion(){
  return snotificacion;
}
/**Fija el valor de snotificacion
@param pSnotificacion nuevo Valor de snotificacion*/
public void setSnotificacion(Integer pSnotificacion){
  snotificacion=pSnotificacion;
}

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